# Matrices and Matrix Operations

Mathematics I · Matrices and Vectors · https://tryals.app/learn/mathematics-i/matrices-and-matrix-operations

## Matrix Basics and Addition

A **matrix** is a rectangular array of numbers organized in **rows** and **columns**. An $m \times n$ matrix has $m$ rows and $n$ columns. They represent linear systems, transformations, and data.

| Operation | Rule | Condition |
| --- | --- | --- |
| **Addition** | Add corresponding entries | Same shape ($m \times n$) |
| **Scalar Multiplication** | Multiply every entry by a scalar | Any matrix |

**Common pitfall:** Never add matrices entry-by-entry if their shapes differ, and never multiply matrices entry-by-entry like addition. Matrix multiplication follows the strict row-times-column rule.

## Matrix Multiplication

The product $AB$ is defined only when the inner dimensions match: the number of columns of $A$ equals the number of rows of $B$. An $m \times n$ times an $n \times p$ matrix yields an $m \times p$ result.

Entry $(i,j)$ is the **dot product** of row $i$ of $A$ and column $j$ of $B$:

$$(AB)_{ij} = \sum_k A_{ik} B_{kj}$$

Matrix multiplication is **not commutative** ($AB \neq BA$), but it is **associative** ($A(BC) = (AB)C$). The **identity matrix** $I$ has ones on the diagonal and satisfies $AI = IA = A$. Square matrices with an inverse $A^{-1}$ where $AA^{-1} = A^{-1}A = I$ are **invertible** (nonsingular).

## Practice questions

4 of this lesson's 9 practice questions, with answers. The full set is in the app.

### 1. Order the steps of computing the entry in row 2, column 3 of the product AB.

**Answer:**

1. Check that the number of columns of A equals the number of rows of B
2. Take row 2 of A
3. Take column 3 of B
4. Multiply matching entries of that row and column and add the results
5. Write the total into position (2, 3) of AB

**Why:** Check the inner dimensions, pick row i from A and column j from B, dot them, and place the number. The index pattern is fixed: the ROW index always refers to the left matrix and the COLUMN index to the right one, which is why AB and BA build entries from entirely different data.

Page: https://tryals.app/practice/mathematics-i/matrices-and-matrix-operations/order-the-steps-of-computing-the-entry-in-row-2-column-3-of-the

### 2. Let A be 3 x 2 and B be 2 x 3. Select every statement that is TRUE.

A. AB is defined and is 3 x 3
B. BA is defined and is 2 x 2
C. AB equals BA
D. A + B is defined
E. AB and BA have different shapes

**Answer:** A. AB is defined and is 3 x 3; B. BA is defined and is 2 x 2; E. AB and BA have different shapes

**Why:** AB is 3 x 3 and BA is 2 x 2: both exist, but they are not even the same size, so they cannot be equal. Addition fails because the shapes differ. This is the strongest possible form of non-commutativity, the two orders live in different spaces entirely.

Page: https://tryals.app/practice/mathematics-i/matrices-and-matrix-operations/let-a-be-3-x-2-and-b-be-2-x-3-select-every-statement-that-is-true

### 3. For square matrices $A$ and $B$ of the same size, $(AB)^{T} = A^{T}B^{T}$.

**Answer:** False

**Why:** False. The correct identity is $(AB)^{T} = B^{T}A^{T}$, the order reverses. For non-square matrices the wrong version does not even typecheck, and for square ones it silently gives a different matrix, since $AB \neq BA$ in general. The same reversal appears in inverses: $(AB)^{-1} = B^{-1}A^{-1}$.

Page: https://tryals.app/practice/mathematics-i/matrices-and-matrix-operations/for-square-matrices-a-and-b-of-the-same-size-ab-t-a-tb-t

### 4. Matrix multiplication is defined by that awkward row-times-column rule rather than entry-by-entry. Why choose the complicated definition?

A. Because it is the rule that makes the product represent composition
B. Because the row-column rule is faster to compute
C. Because entry-by-entry multiplication is undefined for non-square matrices
D. Because it preserves the determinant, which entry-by-entry would not

**Answer:** A. Because it is the rule that makes the product represent composition

**Why:** The definition is reverse-engineered from what it must do: apply B, then A, and the row-column rule is exactly what makes that work. Entry-by-entry multiplication is a real operation, the Hadamard product, and it is used where matrices hold data rather than transformations. The rule follows the meaning.

Page: https://tryals.app/practice/mathematics-i/matrices-and-matrix-operations/matrix-multiplication-is-defined-by-that-awkward-row-times-column
