Matrices & Systems

Study Sheet

Matrices & Systems

Arithmetic with grids of numbers

Matrix Multiplication

Tip
Row times column

The (i,j)(i, j) entry of ABAB is row ii of AA dotted with column jj of BB. Sizes must chain: (m×n)(n×p)=m×p(m\times n)(n\times p) = m\times p. Order MATTERS: ABBAAB \ne BA in general — the single biggest habit change from ordinary algebra.

Concept
A matrix is a machine for systems

The system 2x+y=72x + y = 7, xy=2x - y = 2 is one equation Ax=bA\mathbf x = \mathbf b about the matrix A=(2111)A = \begin{pmatrix}2&1\\1&-1\end{pmatrix}. Solving the system, inverting AA, and asking whether columns are independent are all the SAME question in different clothes.

Example
Linear dependence

(1,2,3)(1,2,3) and (2,4,t)(2,4,t) are dependent exactly when one is a multiple of the other; the first two coordinates force the multiplier to be 22, so t=6t = 6 — dependence is a rigid, all-coordinates condition.

Side note
Significance: matrices are how computers see everything

An image is a matrix of pixels; a social network is an adjacency matrix; a dataset is a rows-by-features matrix; a 3D scene is transformed by 4×44\times4 matrices sixty times a second. Matrix multiplication being composition is why graphics pipelines can collapse a chain of transformations into ONE matrix and apply it to millions of points.

Try it
Try it: predict before you multiply

Let A=(0110)A = \begin{pmatrix}0&-1\\1&0\end{pmatrix} (rotation by 9090^\circ). Predict A2A^2, then compute. Work: two quarter-turns are a half-turn, so A2A^2 should be I-I — and indeed A2=(1001)A^2 = \begin{pmatrix}-1&0\\0&-1\end{pmatrix} ✓. Thinking in maps first turns matrix arithmetic into geometry.

Proofs & Why It Matters

Tip
Proof: matrix multiplication is composition

Let TAT_A and TBT_B be the maps xAx\mathbf x \mapsto A\mathbf x and xBx\mathbf x \mapsto B\mathbf x. Column jj of ABAB is A(Bej)A(B\mathbf e_j) — feed the jjth basis vector through BB, then through AA.

But a linear map is determined by where it sends basis vectors, so the matrix whose columns are A(Bej)A(B\mathbf e_j) IS the matrix of TATBT_A\circ T_B. The row-times-column rule is just this computed entry by entry — and composition of maps is famously order-sensitive, which is WHY ABBAAB \ne BA. \blacksquare

Tip
Proof: row operations preserve solutions

Each operation is reversible: swapping rows swaps back; scaling by c0c \ne 0 undoes by 1c\tfrac1c; adding cc(row ii) to row jj undoes by subtracting. A solution of the old system satisfies every new equation (each new row is a combination of old rows), and reversibility gives the converse. So the solution set never changes on the way to echelon form. \blacksquare

Going Deeper: Explanations & Worked Problems

Concept
What a matrix does: track the basis vectors

Everything about AxA\mathbf x is visible in two special inputs. Feed in e1=(1,0)\mathbf e_1 = (1,0): out comes the FIRST COLUMN of AA. Feed in e2=(0,1)\mathbf e_2 = (0,1): the second column.

Any other input is a combination x=x1e1+x2e2\mathbf x = x_1\mathbf e_1 + x_2\mathbf e_2, and linearity forces Ax=x1(col1)+x2(col2)A\mathbf x = x_1(\text{col}_1) + x_2(\text{col}_2) — matrix-times-vector is a WEIGHTED SUM OF COLUMNS. Example: A=(2103)A = \begin{pmatrix}2&1\\0&3\end{pmatrix} sends the unit square spanned by e1,e2\mathbf e_1, \mathbf e_2 to the parallelogram spanned by (2,0)(2,0) and (1,3)(1,3): the plane is stretched, sheared, and every area is multiplied by detA=6|\det A| = 6. This picture explains the multiplication rule too: the columns of ABAB are AA applied to the columns of BB — do BB first, then AA — which is why ABAB and BABA genuinely differ: shear-then-rotate is not rotate-then-shear.

Example
Worked: a full 2×2 product, entry by entry

Compute ABAB for A=(1234)A = \begin{pmatrix}1&2\\3&4\end{pmatrix}, B=(0152)B = \begin{pmatrix}0&1\\5&2\end{pmatrix}. Entry (1,1)(1,1): row 11 of AA dot column 11 of BB: 10+25=101\cdot0 + 2\cdot5 = 10. Entry (1,2)(1,2): row 11 dot column 22: 11+22=51\cdot1 + 2\cdot2 = 5. Entry (2,1)(2,1): row 22 dot column 11: 30+45=203\cdot0 + 4\cdot5 = 20.

Entry (2,2)(2,2): 31+42=113\cdot1 + 4\cdot2 = 11. So AB=(1052011)AB = \begin{pmatrix}10&5\\20&11\end{pmatrix}. Now the other order: BA=(01+1302+1451+2352+24)=(341118)BA = \begin{pmatrix}0\cdot1+1\cdot3 & 0\cdot2+1\cdot4\\ 5\cdot1+2\cdot3 & 5\cdot2+2\cdot4\end{pmatrix} = \begin{pmatrix}3&4\\11&18\end{pmatrix} — completely different, as composition order predicts. One determinant check seals both: detAdetB=(2)(5)=10\det A\cdot\det B = (-2)(-5) = 10, and det(AB)=1011520=10\det(AB) = 10\cdot11 - 5\cdot20 = 10 ✓.

Example
Worked: solving a system as a matrix question

Solve 2x+y=72x + y = 7, xy=2x - y = 2 three compatible ways.

Way 1 — elimination: add the equations to kill yy: 3x=93x = 9, so x=3x = 3, then y=76=1y = 7 - 6 = 1.

Way 2 — inverse matrix: A=(2111)A = \begin{pmatrix}2&1\\1&-1\end{pmatrix} has detA=21=3\det A = -2 - 1 = -3, so A1=13(1112)A^{-1} = \tfrac{1}{-3}\begin{pmatrix}-1&-1\\-1&2\end{pmatrix}, and x=A1(72)=13(93)=(31)\mathbf x = A^{-1}\begin{pmatrix}7\\2\end{pmatrix} = \tfrac{1}{-3}\begin{pmatrix}-9\\-3\end{pmatrix} = \begin{pmatrix}3\\1\end{pmatrix}.

Way 3 — column picture: find weights making x(21)+y(11)=(72)x\begin{pmatrix}2\\1\end{pmatrix} + y\begin{pmatrix}1\\-1\end{pmatrix} = \begin{pmatrix}7\\2\end{pmatrix}; the weights 33 and 11 work. Three languages, one answer (3,1)(3, 1) — and fluency means moving between them at will.