A matrix is both an algebraic data structure for linear equations and the concrete representation of a linear map between vector spaces. Matrix multiplication embodies the composition of linear mappings, while matrix inversion represents the exact reversal of that transformation. This chapter develops the complete algebra of matrices, elementary matrix factorizations, and the unifying Invertible Matrix Theorem.
An m times nm×n matrix \( A \) consists of \( m \) rows and \( n \) columns. It can be viewed horizontally as a stack of row vectors or vertically as an array of column vectors: \( A = [\mathbf{a}_1 \; \mathbf{a}_2 \; \dots \; \mathbf{a}_n] \).
Horizontal shear \(A = \begin{pmatrix} 1 & 1.5 \\ 0 & 1 \end{pmatrix}\) fixes \(\mathbf{e}_1 = (1,0)\) while tilting \(\mathbf{e}_2 = (0,1)\) to \((1.5, 1)\), preserving area \(\det(A) = 1\).
● Definition 3.1 — Matrix Operations & The Two Perspectives of Matrix Multiplication
1. Entrywise Operations: For matrices \( A, B \in \mathbb{R}^{m \times n} \) and \( c \in \mathbb{R} \): • Addition: \( (A + B)_{ij} = a_{ij} + b_{ij} \). • Scalar Multiplication: \( (c A)_{ij} = c a_{ij} \).
2. Matrix-Vector Product (Column Combination Perspective): For \( \mathbf{x} = (x_1, \dots, x_n)^T \in \mathbb{R}^n \): \[ A\mathbf{x} = x_1 \mathbf{a}_1 + x_2 \mathbf{a}_2 + \dots + x_n \mathbf{a}_n. \] The vector \( A\mathbf{x} \) is a linear combination of the columns of \( A \) with weights from \( \mathbf{x} \).
3. Matrix Multiplication: For \( A \in \mathbb{R}^{m \times n} \) and \( B \in \mathbb{R}^{n \times p} \): • Dot Product Rule: The \( (i, k) \)-th entry of \( AB \) is: \[ (AB)_{ik} = \sum_{j=1}^n a_{ij} b_{jk} = \text{Row}_i(A) \cdot \text{Col}_k(B). \] • Column Perspective: \( AB = [A\mathbf{b}_1 \; A\mathbf{b}_2 \; \dots \; A\mathbf{b}_p] \). Each column of \( AB \) is \( A \) applied to a column of \( B \).
● Theorem 3.1 & Analytical Proof · Transpose of a Matrix Product
Theorem: For any \( A \in \mathbb{R}^{m \times n} \) and \( B \in \mathbb{R}^{n \times p} \): \[ (AB)^T = B^T A^T. \] (Notice the order of multiplication is strictly reversed).
Proof: Let \( C = AB \). The \( (i, k) \)-th entry of \( C^T = (AB)^T \) is the \( (k, i) \)-th entry of \( C \): \[ (C^T)_{ik} = C_{ki} = (AB)_{ki} = \sum_{j=1}^n A_{kj} B_{ji}. \] Now consider the product \( D = B^T A^T \). The \( (i, k) \)-th entry of \( D \) is: \[ D_{ik} = \sum_{j=1}^n (B^T)_{ij} (A^T)_{jk} = \sum_{j=1}^n B_{ji} A_{kj} = \sum_{j=1}^n A_{kj} B_{ji}. \] Since \( (C^T)_{ik} = D_{ik} \) for all \( i, k \), it follows that \( (AB)^T = B^T A^T \). \(\blacksquare\)
◆ Why It Works — First-Principles Derivation (Matrices, Matrix Algebra & Inverses)
Why Orthogonal Projection & Eigenvalue Characteristic Equations Work: Decompose \(\mathbf{u} = c\mathbf{v} + \mathbf{w}\) where \(\mathbf{w} \perp \mathbf{v}\). Taking the dot product with \(\mathbf{v}\) uses \(\mathbf{w}\cdot\mathbf{v} = 0\) to isolate \(c\):
For eigenvalues, \(A\mathbf{v} = \lambda\mathbf{v}\) with \(\mathbf{v} \ne \mathbf{0}\) is equivalent to \((A - \lambda I)\mathbf{v} = \mathbf{0}\). A homogeneous linear system has a non-trivial nullspace vector \(\mathbf{v} \ne \mathbf{0}\) if and only if the matrix \(A - \lambda I\) is singular, yielding the characteristic polynomial \(\det(A - \lambda I) = 0\).
Level 1 (Foundations) — Worked Example · Matrix Multiplication & Non-Commutativity
Problem. Let \( A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \) and \( B = \begin{pmatrix} 0 & -1 \\ 2 & 1 \end{pmatrix} \). Compute \( AB \) and \( BA \), verify that \( AB \neq BA \), and verify that \( (AB)^T = B^T A^T \).
Worked Example \(B\) — Matrices, Matrix Algebra & Inverses (Easy Application)
Problem. Consider the matrix \( A = \begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix} \). If a point \( P=(x,y) \) is transformed by \( A \) to \( P'=(x',y') \), such that \( \begin{pmatrix} x' \\ y' \end{pmatrix} = A \begin{pmatrix} x \\ y \end{pmatrix} \), what is the image of the point \( (3,1) \) under this transformation?
▸ Show step-by-step solution
The transformation is defined by the matrix multiplication \( \begin{pmatrix} x' \\ y' \end{pmatrix} = A \begin{pmatrix} x \\ y \end{pmatrix} \). We are given the point \( (3,1) \), so \( \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 3 \\ 1 \end{pmatrix} \) and the matrix \( A = \begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix} \). Performing the matrix multiplication:
\( \begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix} \begin{pmatrix} 3 \\ 1 \end{pmatrix} = \begin{pmatrix} (2 \times 3) + (1 \times 1) \\ (1 \times 3) + (3 \times 1) \end{pmatrix} = \begin{pmatrix} 6 + 1 \\ 3 + 3 \end{pmatrix} = \begin{pmatrix} 7 \\ 6 \end{pmatrix} \)
Therefore, the image of the point \( (3,1) \) is \( (7,6) \).
Error Diagnosis — Common Student Traps vs. Exam-Board Method (Matrices, Matrix Algebra & Inverses)
Common Student Trap
Why It Fails Mathematically
Correct Exam-Board Method
Computing angle at \(B\) using \(\overrightarrow{AB}\cdot\overrightarrow{BC}\)
Vectors are head-to-tail instead of tail-to-tail, giving \(180^\circ - \theta\).
Reverse \(\overrightarrow{AB}\) so both emanate from \(B\): use \(\overrightarrow{BA}\cdot\overrightarrow{BC}\).
Using the same parameter \(t\) for two intersecting 3D lines \(\mathbf{r}_1(t) = \mathbf{r}_2(t)\)
Tests for a simultaneous collision at time \(t\) rather than geometric intersection of paths.
Assign distinct parameters \(\lambda\) and \(\mu\) to the two lines before equating components.
Assuming \((AB)^{-1} = A^{-1}B^{-1}\)
Multiplying \((AB)(A^{-1}B^{-1})\) does not cancel inner factors when \(AB \ne BA\).
Use the shoe-sock reversal law: \((AB)^{-1} = B^{-1}A^{-1}\).
Fast Matrix & Vector Verification (University Linear Algebra & Matrix Theory): Check every \(2\times 2\) or \(3\times 3\) eigenvalue computation using the trace and determinant invariants: \(\sum \lambda_i = \operatorname{tr}(A)\) (sum of diagonal entries) and \(\prod \lambda_i = \det(A)\).
Level 1 · Foundations
Let \( A = \begin{pmatrix} 2 & -1 & 3 \\ 4 & 0 & -2 \end{pmatrix} \) and \( \mathbf{x} = \begin{pmatrix} 3 \\ -2 \\ 1 \end{pmatrix} \). Compute \( A\mathbf{x} \) explicitly using the linear combination of columns definition.
Level 2 · Medium — Matrix Inverses, Invertibility of 2×2 Matrices & The Gauss–Jordan Algorithm
A square \( n \times n \) matrix \( A \) is invertible (non-singular) if it represents a bijection on \( \mathbb{R}^n \). Inverting \( A \) allows direct algebraic solution of linear systems: \( A\mathbf{x} = \mathbf{b} \iff \mathbf{x} = A^{-1}\mathbf{b} \).
● Theorem 3.2 & Proof · Inversion of \(2 \times 2\) Matrices & The Product Inversion Rule
Theorem 1 (2×2 Inversion): The matrix \( A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \) is invertible if and only if \( \det(A) = ad - bc \neq 0 \). Its inverse is: \[ A^{-1} = \frac{1}{ad - bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix}. \]
Proof: Let \( \Delta = ad - bc \neq 0 \). Multiply \( A \) by \( B = \frac{1}{\Delta}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \): \[ AB = \frac{1}{\Delta} \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} = \frac{1}{\Delta} \begin{pmatrix} ad - bc & -ab + ba \\ cd - dc & -cb + da \end{pmatrix} = \frac{1}{\Delta} \begin{pmatrix} \Delta & 0 \\ 0 & \Delta \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I. \] Similarly, computing \( BA \) gives \( I \). Thus \( B = A^{-1} \). \(\blacksquare\)
Theorem 2 (Inverse of a Product): If \( A \) and \( B \) are invertible \( n \times n \) matrices, then \( AB \) is invertible and: \[ (AB)^{-1} = B^{-1} A^{-1}. \]
Proof: Using associativity: \[ (AB)(B^{-1} A^{-1}) = A(B B^{-1}) A^{-1} = A I A^{-1} = A A^{-1} = I. \] \[ (B^{-1} A^{-1})(AB) = B^{-1}(A^{-1} A) B = B^{-1} I B = B^{-1} B = I. \] By uniqueness of inverses, \( (AB)^{-1} = B^{-1} A^{-1} \). \(\blacksquare\)
⊙ Explorer · Matrix transformation sandbox
interactive
The matrix, its column images, determinant, and orientation
quantity
value
presets:
\(\det (A)\)\(1.000\)
area scale factor\(1.000\)
The indigo arrow is A's first column A \(e_{1}\); the amber arrow is its second column A \(e_{2}\). The filled parallelogram represents the image of the unit square, with area equal to \(|\det (A)|\). When \(\det (A) < 0\), the fill switches to amber, reflecting orientation reversal.
Action of matrix \( A = \begin{pmatrix} 3 & 1 \\ 1 & 2 \end{pmatrix} \) on standard basis vectors \( \mathbf{e}_1 = \langle 1, 0 \rangle \) and \( \mathbf{e}_2 = \langle 0, 1 \rangle \). The columns of \( A \) define the transformed coordinate axes.
Level 2 (Medium) — Worked Example · Matrix Inversion via Gauss–Jordan [A | I] Algorithm
Let \( A = \begin{pmatrix} 3 & 5 \\ 1 & 2 \end{pmatrix} \) and \( \mathbf{b} = \begin{pmatrix} 4 \\ 1 \end{pmatrix} \). Compute \( A^{-1} \) and use it to solve the linear system \( A\mathbf{x} = \mathbf{b} \).
Level 3 · Advanced / University Rigor — Elementary Matrices & The Invertible Matrix Theorem
Every elementary row operation corresponds to pre-multiplying by an elementary matrix \( E \). This establishes the profound equivalence between row reduction algorithms, matrix factorizations, and the structural properties of linear mappings.
● Theorem 3.3 · Elementary Matrix Decomposition
An elementary matrix \( E \) is obtained by performing a single elementary row operation on the identity matrix \( I \). Pre-multiplying any matrix \( A \) by \( E \) executes that exact row operation on \( A \): \[ \text{RowOp}(A) = E A. \]
Every elementary matrix \( E \) is invertible, and its inverse \( E^{-1} \) is the elementary matrix of the same type that reverses the operation. Consequently, an \( n \times n \) matrix \( A \) is invertible if and only if it is row equivalent to \( I_n \), in which case \( A \) can be factored as a product of elementary matrices: \[ A = E_1 E_2 \dots E_k. \]
● Theorem 3.4 · The Invertible Matrix Theorem (IMT)
Let \( A \) be a square \( n \times n \) matrix. The following statements are mathematically equivalent (either all are true, or all are false):
\( A \) is an invertible matrix.
\( A \) is row equivalent to the \( n \times n \) identity matrix \( I_n \).
\( A \) has \( n \) pivot positions (rank \( A = n \)).
The equation \( A\mathbf{x} = \mathbf{0} \) has only the trivial solution \( \mathbf{x} = \mathbf{0} \).
The columns of \( A \) form a linearly independent set.
The linear transformation \( T(\mathbf{x}) = A\mathbf{x} \) is one-to-one (injective).
The equation \( A\mathbf{x} = \mathbf{b} \) has at least one solution for each \( \mathbf{b} \in \mathbb{R}^n \).
The columns of \( A \) span \( \mathbb{R}^n \).
The linear transformation \( T(\mathbf{x}) = A\mathbf{x} \) maps \( \mathbb{R}^n \) onto \( \mathbb{R}^n \) (surjective).
There is an \( n \times n \) matrix \( C \) such that \( CA = I \).
There is an \( n \times n \) matrix \( D \) such that \( AD = I \).
\( A^T \) is an invertible matrix.
\( \det(A) \neq 0 \).
The number \( 0 \) is not an eigenvalue of \( A \).
Assuming Zero Product Property: If \( AB = 0 \), it does NOT imply \( A = 0 \) or \( B = 0 \). For example, \( \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix} \). Non-zero matrices can have zero products!
Cancellation Fallacy: If \( AB = AC \) and \( A \neq 0 \), you CANNOT cancel \( A \) to conclude \( B = C \). Cancellation is legal only if \( A \) is invertible (\( \det(A) \neq 0 \)).
Order of Inverses and Transposes: Remembering socks and shoes: \( (AB)^{-1} = B^{-1} A^{-1} \) and \( (AB)^T = B^T A^T \). Writing \( (AB)^{-1} = A^{-1} B^{-1} \) is a fatal error in non-commutative matrix algebra.
Level 3 (Advanced) — Worked Example · One-Sided Inverses for Square Matrices
Problem. Let \( A \) and \( B \) be \( n \times n \) square matrices such that \( AB = I \). Prove rigorously that \( BA = I \) and therefore \( B = A^{-1} \).
▸ Show step-by-step solution
Step 1 · Consider the Homogeneous Equation \( B\mathbf{x} = \mathbf{0} \): Suppose \( B\mathbf{x} = \mathbf{0} \) for some vector \( \mathbf{x} \in \mathbb{R}^n \). Pre-multiply by \( A \): \[ A(B\mathbf{x}) = A\mathbf{0} \implies (AB)\mathbf{x} = \mathbf{0} \implies I\mathbf{x} = \mathbf{0} \implies \mathbf{x} = \mathbf{0}. \] Thus \( B\mathbf{x} = \mathbf{0} \) has only the trivial solution.
Step 2 · Apply the Invertible Matrix Theorem: Since \( B \) is an \( n \times n \) square matrix whose homogeneous equation has only the trivial solution, by the IMT (statement 4 \(\implies\) statement 1), \( B \) is invertible, so \( B^{-1} \) exists.
Step 3 · Compute \( BA \): Multiply \( AB = I \) on the left by \( B^{-1} \) and on the right by \( B \): \[ B^{-1}(AB)B = B^{-1}(I)B \implies (B^{-1}A B)B = B^{-1}B = I. \] More directly, multiply \( AB = I \) on the left by \( B \) and on the right by \( B^{-1} \): \[ B(AB)B^{-1} = B(I)B^{-1} \implies (BA)(BB^{-1}) = BB^{-1} \implies (BA)I = I \implies \mathbf{BA = I}. \] Thus \( B \) is the genuine two-sided inverse of \( A \). \(\blacksquare\)
Level 3 · Advanced / University Rigor
Suppose an \( n \times n \) matrix \( A \) satisfies the polynomial equation \( A^3 - 4A^2 + 2A - 5I = 0 \). Prove that \( A \) is invertible, and express \( A^{-1} \) as an explicit polynomial in \( A \).
Divide both sides by 5: \(\frac{1}{5}\left( A^3 - 4A^2 + 2A \right) = I\) · Factor out \( A \): \(A \left[ \frac{1}{5}\left( A^2 - 4A + 2I \right) \right] = I\).
💡 Hint 3 of 3
Similarly, since polynomials in \(A\) commute: \(\left[ \frac{1}{5}\left( A^2 - 4A + 2I \right) \right] A = I\).
Step 1 · Isolate the Identity Matrix: \[ A^3 - 4A^2 + 2A = 5I. \] Divide both sides by 5: \[ \frac{1}{5}\left( A^3 - 4A^2 + 2A \right) = I. \]
Step 2 · Factor out \( A \): \[ A \left[ \frac{1}{5}\left( A^2 - 4A + 2I \right) \right] = I. \] Similarly, since polynomials in \( A \) commute: \[ \left[ \frac{1}{5}\left( A^2 - 4A + 2I \right) \right] A = I. \]
Conclusion: By the definition of matrix inverse, \( A \) is invertible, and its inverse is: \[ \mathbf{A^{-1} = \frac{1}{5}A^2 - \frac{4}{5}A + \frac{2}{5}I}. \]
[Practice 4 · Medium] A planar linear transformation \( B \) scales \( a \) by \( 21 \) and \( y \) by \( 14 \) with matrix \( T = \begin{pmatrix} 21 & 0 \\ 0 & 14 \end{pmatrix} \). Determine the matrix trace \( \text{tr}(T) \).
💡 Hint 1 of 3
The trace of the scaling matrix is the sum of its main diagonal entries: \(\text{tr}(T)\).
💡 Hint 2 of 3
Rewrite and substitute: \(\text{tr}(T) = 21 + 14\).
💡 Hint 3 of 3
Evaluate \(21 + 14\) to obtain the final answer.
The trace of the scaling matrix is the sum of its main diagonal entries: \( \text{tr}(T) = 21 + 14 = 35 \).
Consider the matrix \( A = \begin{pmatrix} 2 & 1 \\ 1 & 3 \end{pmatrix} \). If a point \( P=(x,y) \) is transformed by \( A \) to \( P'=(x',y') \), such that \( \begin{pmatrix} x' \\ y' \end{pmatrix} = A \begin{pmatrix} x \\ y \end{pmatrix} \), what is the image of the point \( (3,1) \) under this transformation?
💡 Hint 1 of 3
The transformation is defined by the matrix multiplication \( \begin{pmatrix} x' \\ y' \end{pmatrix} = A \begin{pmatrix} x \\ y \end{pmatrix} \).