A matrix is a linear map written as a grid. A x ⃗ A\vec{x} A x transforms x ⃗ \vec{x} x ; everything in this page — determinants, row reduction, eigenvectors — is about understanding that map.
For A ∈ R m × n A \in \mathbb{R}^{m \times n} A ∈ R m × n , B ∈ R n × p B \in \mathbb{R}^{n \times p} B ∈ R n × p : the product A B ∈ R m × p AB \in \mathbb{R}^{m \times p} A B ∈ R m × p has entries
( A B ) i j = ∑ k A i k B k j (row i of A ⋅ column j of B ) (AB)_{ij} = \sum_k A_{ik} B_{kj} \quad \text{(row } i \text{ of } A \cdot \text{column } j \text{ of } B\text{)} ( A B ) ij = ∑ k A ik B k j (row i of A ⋅ column j of B )
Not commutative: A B ≠ B A AB \neq BA A B = B A in general.
Transpose: ( A B ) T = B T A T (AB)^T = B^T A^T ( A B ) T = B T A T .
Inverse (2×2): ( a b c d ) − 1 = 1 a d − b c ( d − b − c a ) \begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \dfrac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} ( a c b d ) − 1 = a d − b c 1 ( d − c − b a ) , exists iff a d − b c ≠ 0 ad - bc \neq 0 a d − b c = 0 .
Worked example.
( 1 2 3 4 ) ( 0 1 1 1 ) = ( 2 3 4 7 ) , ( 0 1 1 1 ) ( 1 2 3 4 ) = ( 3 4 4 6 ) \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 0 & 1 \\ 1 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 3 \\ 4 & 7 \end{pmatrix}, \qquad \begin{pmatrix} 0 & 1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} = \begin{pmatrix} 3 & 4 \\ 4 & 6 \end{pmatrix} ( 1 3 2 4 ) ( 0 1 1 1 ) = ( 2 4 3 7 ) , ( 0 1 1 1 ) ( 1 3 2 4 ) = ( 3 4 4 6 )
Same matrices, different order, different result.
Let A = ( 2 − 1 0 3 ) A = \begin{pmatrix} 2 & -1 \\ 0 & 3 \end{pmatrix} A = ( 2 0 − 1 3 ) , B = ( 1 1 − 2 0 ) B = \begin{pmatrix} 1 & 1 \\ -2 & 0 \end{pmatrix} B = ( 1 − 2 1 0 ) .
a) Compute A B AB A B and B A BA B A .
b) Compute A − 1 A^{-1} A − 1 and verify A A − 1 = I A A^{-1} = I A A − 1 = I .
c) Solve A x ⃗ = ( 1 6 ) A\vec{x} = \begin{pmatrix} 1 \\ 6 \end{pmatrix} A x = ( 1 6 ) using A − 1 A^{-1} A − 1 .
Get AI feedback…or hover here and press Ctrl+V to paste a screenshot
det ( a b c d ) = a d − b c \det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc det ( a c b d ) = a d − b c
3×3 by cofactor expansion along the first row:
det ( a b c d e f g h i ) = a ( e i − f h ) − b ( d i − f g ) + c ( d h − e g ) \det\begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix} = a(ei - fh) - b(di - fg) + c(dh - eg) det a d g b e h c f i = a ( e i − f h ) − b ( d i − f g ) + c ( d h − e g )
Meaning: ∣ det A ∣ |\det A| ∣ det A ∣ is the volume-scaling factor of the map A A A ; det A = 0 ⟺ \det A = 0 \iff det A = 0 ⟺ the map squashes space flat ⟺ A \iff A ⟺ A has no inverse. Row swaps flip the sign; det ( A B ) = det A det B \det(AB) = \det A \det B det ( A B ) = det A det B .
Worked example.
det ( 2 0 1 1 3 − 1 0 2 1 ) = 2 ( 3 + 2 ) − 0 + 1 ( 2 − 0 ) = 12 \det\begin{pmatrix} 2 & 0 & 1 \\ 1 & 3 & -1 \\ 0 & 2 & 1 \end{pmatrix} = 2(3 + 2) - 0 + 1(2 - 0) = 12 det 2 1 0 0 3 2 1 − 1 1 = 2 ( 3 + 2 ) − 0 + 1 ( 2 − 0 ) = 12
a) det ( 3 − 2 4 5 ) \det\begin{pmatrix} 3 & -2 \\ 4 & 5 \end{pmatrix} det ( 3 4 − 2 5 )
b) det ( 1 2 0 − 1 1 3 2 0 1 ) \det\begin{pmatrix} 1 & 2 & 0 \\ -1 & 1 & 3 \\ 2 & 0 & 1 \end{pmatrix} det 1 − 1 2 2 1 0 0 3 1
c) For which λ \lambda λ is ( 2 − λ 1 4 2 − λ ) \begin{pmatrix} 2-\lambda & 1 \\ 4 & 2-\lambda \end{pmatrix} ( 2 − λ 4 1 2 − λ ) singular? (This is a preview of eigenvalues.)
Get AI feedback…or hover here and press Ctrl+V to paste a screenshot
Write A x ⃗ = b ⃗ A\vec{x} = \vec{b} A x = b as an augmented matrix and reduce with three legal moves: swap rows, scale a row, add a multiple of one row to another.
Worked example.
{ x + 2 y − z = 3 2 x + y + z = 3 x − y + 2 z = 0 \begin{cases} x + 2y - z = 3 \\ 2x + y + z = 3 \\ x - y + 2z = 0 \end{cases} ⎩ ⎨ ⎧ x + 2 y − z = 3 2 x + y + z = 3 x − y + 2 z = 0
( 1 2 − 1 3 2 1 1 3 1 − 1 2 0 ) → R 2 − 2 R 1 , R 3 − R 1 ( 1 2 − 1 3 0 − 3 3 − 3 0 − 3 3 − 3 ) \left(\begin{array}{ccc|c} 1 & 2 & -1 & 3 \\ 2 & 1 & 1 & 3 \\ 1 & -1 & 2 & 0 \end{array}\right) \xrightarrow{R_2 - 2R_1,\; R_3 - R_1} \left(\begin{array}{ccc|c} 1 & 2 & -1 & 3 \\ 0 & -3 & 3 & -3 \\ 0 & -3 & 3 & -3 \end{array}\right) 1 2 1 2 1 − 1 − 1 1 2 3 3 0 R 2 − 2 R 1 , R 3 − R 1 1 0 0 2 − 3 − 3 − 1 3 3 3 − 3 − 3
R 3 = R 2 R_3 = R_2 R 3 = R 2 : one equation is redundant — infinitely many solutions. From R 2 R_2 R 2 : y = z + 1 y = z + 1 y = z + 1 ; from R 1 R_1 R 1 : x = 1 − z x = 1 - z x = 1 − z . Solution line: ( x , y , z ) = ( 1 , 1 , 0 ) + t ( − 1 , 1 , 1 ) (x, y, z) = (1, 1, 0) + t(-1, 1, 1) ( x , y , z ) = ( 1 , 1 , 0 ) + t ( − 1 , 1 , 1 ) .
Rank tells the story: rank 3 → unique solution; rank 2 with consistent system → a line of solutions; inconsistent row ( 0 0 0 ∣ c ) (0\,0\,0\,|\,c) ( 0 0 0 ∣ c ) , c ≠ 0 c \neq 0 c = 0 → none.
Solve by row reduction, by hand, showing the augmented matrix at each step:
a) { 2 x + y = 5 x − 3 y = − 1 \begin{cases} 2x + y = 5 \\ x - 3y = -1 \end{cases} { 2 x + y = 5 x − 3 y = − 1
b) { x + y + z = 6 2 x − y + z = 3 x + 2 y − z = 2 \begin{cases} x + y + z = 6 \\ 2x - y + z = 3 \\ x + 2y - z = 2 \end{cases} ⎩ ⎨ ⎧ x + y + z = 6 2 x − y + z = 3 x + 2 y − z = 2
c) { x − y + 2 z = 1 2 x − 2 y + 4 z = 3 \begin{cases} x - y + 2z = 1 \\ 2x - 2y + 4z = 3 \end{cases} { x − y + 2 z = 1 2 x − 2 y + 4 z = 3 — how many solutions, and why?
Get AI feedback…or hover here and press Ctrl+V to paste a screenshot
v ⃗ ≠ 0 \vec{v} \neq 0 v = 0 is an eigenvector of A A A with eigenvalue λ \lambda λ if
A v ⃗ = λ v ⃗ A\vec{v} = \lambda\vec{v} A v = λ v
— the map only stretches v ⃗ \vec{v} v , never rotates it. Find λ \lambda λ from the characteristic equation det ( A − λ I ) = 0 \det(A - \lambda I) = 0 det ( A − λ I ) = 0 , then each v ⃗ \vec{v} v from ( A − λ I ) v ⃗ = 0 (A - \lambda I)\vec{v} = 0 ( A − λ I ) v = 0 .
Worked example. A = ( 4 1 2 3 ) A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix} A = ( 4 2 1 3 )
det ( A − λ I ) = ( 4 − λ ) ( 3 − λ ) − 2 = λ 2 − 7 λ + 10 = ( λ − 5 ) ( λ − 2 ) \det(A - \lambda I) = (4-\lambda)(3-\lambda) - 2 = \lambda^2 - 7\lambda + 10 = (\lambda - 5)(\lambda - 2) det ( A − λ I ) = ( 4 − λ ) ( 3 − λ ) − 2 = λ 2 − 7 λ + 10 = ( λ − 5 ) ( λ − 2 )
λ 1 = 5 \lambda_1 = 5 λ 1 = 5 : ( A − 5 I ) v ⃗ = 0 ⇒ ( − 1 1 2 − 2 ) v ⃗ = 0 ⇒ v ⃗ 1 = ( 1 , 1 ) (A - 5I)\vec{v} = 0 \Rightarrow \begin{pmatrix} -1 & 1 \\ 2 & -2 \end{pmatrix}\vec{v} = 0 \Rightarrow \vec{v}_1 = (1, 1) ( A − 5 I ) v = 0 ⇒ ( − 1 2 1 − 2 ) v = 0 ⇒ v 1 = ( 1 , 1 ) .
λ 2 = 2 \lambda_2 = 2 λ 2 = 2 : ( 2 1 2 1 ) v ⃗ = 0 ⇒ v ⃗ 2 = ( 1 , − 2 ) \begin{pmatrix} 2 & 1 \\ 2 & 1 \end{pmatrix}\vec{v} = 0 \Rightarrow \vec{v}_2 = (1, -2) ( 2 2 1 1 ) v = 0 ⇒ v 2 = ( 1 , − 2 ) .
The map A A A applied to a ring of unit vectors. Eigenvectors (dashed) keep their direction — everything else turns.
Python Loading editor…
import numpy as np
import matplotlib.pyplot as plt
A = np.array([[4.0, 1.0],
[2.0, 3.0]]) # edit me
theta = np.linspace(0, 2*np.pi, 60)
circle = np.stack([np.cos(theta), np.sin(theta)])
image = A @ circle
vals, vecs = np.linalg.eig(A)
plt.plot(circle[0], circle[1], 'C0.', ms=3, label='unit circle')
plt.plot(image[0], image[1], 'C1.', ms=3, label='A · circle')
for i in range(2):
v = vecs[:, i] * vals[i]
plt.plot([0, v[0]], [0, v[1]], 'k--')
plt.annotate(f'λ={vals[i]:.1f}', v)
plt.gca().set_aspect('equal'); plt.grid(True); plt.legend()
plt.show()
a) Find the eigenvalues and eigenvectors of B = ( 3 1 1 3 ) B = \begin{pmatrix} 3 & 1 \\ 1 & 3 \end{pmatrix} B = ( 3 1 1 3 ) .
b) Find the eigenvalues of C = ( 2 1 0 2 ) C = \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix} C = ( 2 0 1 2 ) and all eigenvectors. What is geometrically special here?
c) Without computing: the matrix R = ( 0 − 1 1 0 ) R = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} R = ( 0 1 − 1 0 ) rotates by 90°. Argue why it has no real eigenvectors, then confirm via the characteristic polynomial.
Get AI feedback…or hover here and press Ctrl+V to paste a screenshot