# Matrices and Matrix Operations

Physics I · Linear Algebra and Geometry · https://tryals.app/learn/physics-i/matrices-and-matrix-operations

## Matrix Basics

A **matrix** is a rectangular array of numbers arranged in **rows** and **columns**. An $m \times n$ matrix has $m$ rows and $n$ columns.

$$A = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}$$

Every matrix represents a **linear map** between vector spaces. Transformations compose in order, so **matrix multiplication** depends strictly on factor sequence.

| Operation | Condition | Definition |
| --- | --- | --- |
| **Sum** | Same size | $(A+B)_{ij} = a_{ij} + b_{ij}$ |
| **Scalar** | Any size | $(\alpha A)_{ij} = \alpha a_{ij}$ |
| **Product** | Cols $A$ = Rows $B$ | $(AB)_{ij} = \sum_k a_{ik} b_{kj}$ |

## Rules and Pitfalls

Matrix arithmetic follows strict algebraic laws. The **identity matrix** $I_n$ acts as a neutral element such that $AI = IA = A$.

The **transpose** operation flips a matrix across its main diagonal, defined by $(A^T)_{ij} = a_{ji}$. Multiplication is **associative**, meaning $(AB)C = A(BC)$.

| Property | Rule |
| --- | --- |
| Associativity | $(AB)C = A(BC)$ |
| Commutativity | $AB \neq BA$ in general |

> **Common pitfall:** Matrix multiplication is **not commutative** ($AB \neq BA$). Rotate-then-reflect differs from reflect-then-rotate. Never swap factors casually.

## Practice questions

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

### 1. Sort these into Square Matrix or Not Necessarily Square.

**Answer:**

- Square: Identity matrix I, Diagonal matrix, Symmetric matrix
- Not necessarily square: $3\times5$ matrix, Row vector (1$\times n)$

**Why:** Identity, diagonal, and symmetric matrices are defined only for square matrices.

Page: https://tryals.app/practice/physics-i/matrices-and-matrix-operations/sort-these-into-square-matrix-or-not-necessarily-square

### 2. For two square matrices, $AB$ and $BA$ are generally **different**. What everyday analogy captures why order matters?

A. Adding 3 then 5 vs. adding 5 then 3, order never matters
B. Shuffling a deck twice, any order gives the same shuffle
C. Socks then shoes vs shoes then socks: order composes
D. Multiplying 3 × 5 vs. 5 × 3

**Answer:** C. Socks then shoes vs shoes then socks: order composes

**Why:** A matrix is a transformation, and transformations compose like actions in time: rotate-then-reflect rarely equals reflect-then-rotate. Losing commutativity is the price of upgrading from numbers to actions, and non-commutativity later becomes the engine of quantum mechanics.

Page: https://tryals.app/practice/physics-i/matrices-and-matrix-operations/for-two-square-matrices-ab-and-ba-are-generally-different-what

### 3. Matrix multiplication is associative but not commutative. What does each property say about the transformations involved?

A. That associativity holds only for square matrices
B. That the properties are notational conventions with no geometric meaning
C. Grouping does not change the result, but ORDER does
D. That matrices behave like numbers in most respects but not all

**Answer:** C. Grouping does not change the result, but ORDER does

**Why:** Both properties are geometric facts. Associativity is why a chain can be pre-multiplied into one matrix; non-commutativity is why the chain must be kept in order when you do.

Page: https://tryals.app/practice/physics-i/matrices-and-matrix-operations/matrix-multiplication-is-associative-but-not-commutative-what-does

### 4. Order the steps to compute $AB$ where $A$ and $B$ are $2\times2$ matrices.

**Answer:**

1. Verify dimensions are compatible (2$\times2$ $\cdot 2 \times2)$
2. Compute row 1 of A against column 1 of B → entry (1,1)
3. Repeat for all four entries
4. Assemble the $2 \times 2$ result matrix

**Why:** Each entry of the product is one dot product; assemble all four to get the result.

Page: https://tryals.app/practice/physics-i/matrices-and-matrix-operations/order-the-steps-to-compute-ab-where-a-and-b-are-2-2-matrices
