Matrices
| English | Chinese | Pinyin |
|---|---|---|
| matrix | 矩阵 | jǔ zhèn |
| transformation | 变换 | biàn huàn |
| identity matrix | 单位矩阵 | dān wèi jǔ zhèn |
| determinant | 行列式 | háng liè shì |
| inverse | 逆 | nì |
| singular | 奇异 | qí yì |
| invariant | 不变 | bù biàn |
| enlargement | 放大 | fàng dà |
The mathematics that powers computer graphics
- Every time you rotate an image on your phone, a matrix 矩阵 multiplication is doing the work behind the scenes.
- Matrices are the language of transformations 变换 — they describe rotations, reflections, stretches, and projections in a single compact object.
Matrix basics
- A matrix is a rectangular block of numbers. Multiply row × column.
- The identity matrix 单位矩阵 $I$ leaves a matrix unchanged: $AI = IA = A$.
Worked example. $\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \begin{pmatrix} 5 \\ 6 \end{pmatrix} = \begin{pmatrix} 1(5) + 2(6) \\ 3(5) + 4(6) \end{pmatrix} = \begin{pmatrix} 17 \\ 39 \end{pmatrix}$.
Matrices
(x', y') = M(x, y)
A matrix transforms the plane; its determinant is the area scale factor (negative = a flip).
Multiply [[1, 2], [3, 4]] by [[5], [6]]. The top entry of the result is?
1(5) + 2(6) = 5 + 12 = 17.
Put the steps for finding the inverse of a 2x2 matrix [[a,b],[c,d]] in order.
The inverse is (1/det)[[d,−b],[−c,a]] — swap the diagonal, negate the off-diagonal, divide by det.
Determinants 行列式 and inverses 逆
- For $A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$: the determinant is $\det A = ad - bc$.
- If $\det A \neq 0$ (non-singular 奇异), the inverse is $A^{-1} = \dfrac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}$.
Singular matrices have no inverse. If $\det A = 0$, the matrix is singular — it squashes the plane into a line, losing information that can't be recovered.
What is the determinant of the matrix [[3, 1], [2, 4]] (ad − bc)?
det = 3×4 − 1×2 = 12 − 2 = 10.
A 2×2 matrix has an inverse exactly when its determinant is:
A non-singular matrix (det ≠ 0) is invertible; det = 0 means singular (no inverse).
For A = [[3, 1], [2, 4]] with det = 10, the top-left entry of A⁻¹ is d/det. Find it.
A⁻¹ = (1/10)[[4, -1], [-2, 3]]. Top-left = 4/10 = 0.4.
Matrices as transformations
- A $2\times2$ matrix represents a transformation of the plane; $\det A$ = the area scale factor.

A 2x2 matrix maps the unit square to a parallelogram; its determinant is the area scale factor.
- A product $AB$ means "do $B$, then $A$". Points/lines that don't move are invariant 不变.
For a transformation matrix, the determinant gives the:
The determinant is the factor by which areas are scaled by the transformation.
For matrices A and B, the product AB means "do B first, then A".
Matrix multiplication is applied right to left: AB(x) = A(B(x)), so B acts first.
Common transformations
| Matrix | Transformation |
|---|---|
| $\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}$ | Reflection in $y$-axis |
| $\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$ | Rotation $90°$ anticlockwise |
| $\begin{pmatrix} k & 0 \\ 0 & k \end{pmatrix}$ | Enlargement 放大 scale factor $k$ |
- Know matrix addition, the zero matrix, the identity (or unit) matrix, and invariant points and invariant lines of a transformation.
You've got it
- $\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc$; invertible when $\det \neq 0$
- $A^{-1} = \dfrac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}$
- a matrix is a transformation; $\det$ = area scale factor; $AB$ = "do $B$, then $A$"