Matrices and Determinants

⚡ Key Takeaways

A matrix is a rectangular array of numbers; a determinant is a single scalar computed from a square matrix that encodes whether the matrix is invertible and how it scales area/volume. Key result: a square matrix has an inverse if and only if its determinant is nonzero, and systems of linear equations Ax=bA\mathbf{x}=\mathbf{b} can be solved using matrices. Used everywhere: solving linear systems, computer graphics, physics, statistics, cryptography. Foundations laid by Leibniz, Cramer, Cayley, and Sylvester (17th–19th centuries).

💡 The Core Insight

A matrix is best understood not as a static grid of numbers but as a linear transformation — a rule that takes input vectors to output vectors while preserving lines and the origin. The determinant then answers one question with a single number: by what signed factor does this transformation stretch area or volume? If that factor is zero, the transformation squashes space into a lower dimension and cannot be undone — hence the matrix is non-invertible precisely when its determinant is zero.

Formal Statement

DefinitionMatrix

An m×nm \times n matrix is a rectangular array of numbers with mm rows and nn columns:

1
A=[a11a12⋯a1na21a22⋯a2n⋮⋮⋱⋮am1am2⋯amn]\quad A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix}

Derivation hint: This is a definition; aija_{ij} denotes the entry in row ii, column jj. The pair (m,n)(m,n) is the order or dimension of the matrix. Here aij∈Ra_{ij} \in \mathbb{R} (or C\mathbb{C}). If m=nm=n the matrix is square. A matrix with one column (n=1n=1) is a column vector; with one row (m=1m=1), a row vector.

DefinitionMatrix Operations

For matrices of compatible sizes, define:

Addition (entrywise, same order):

2
(A+B)ij=aij+bij\quad (A+B)_{ij} = a_{ij} + b_{ij}

Derivation hint: Add corresponding entries; requires AA and BB to have identical order m×nm\times n.

Scalar multiplication:

3
(kA)ij=k aij\quad (kA)_{ij} = k\,a_{ij}

Derivation hint: Multiply every entry by the scalar kk.

Matrix multiplication (for AA of order m×nm\times n and BB of order n×pn\times p):

4
(AB)ij=∑k=1naik bkj\quad (AB)_{ij} = \sum_{k=1}^{n} a_{ik}\,b_{kj}

Derivation hint: The (i,j)(i,j) entry is the dot product of row ii of AA with column jj of BB; the inner dimensions nn must match. The result is m×pm\times p.

DefinitionSpecial Matrices

The identity matrix InI_n has 11s on the main diagonal and 00s elsewhere; it satisfies AI=IA=AAI = IA = A. The transpose ATA^T swaps rows and columns: (AT)ij=aji(A^T)_{ij} = a_{ji}. The zero matrix OO has all entries zero. A matrix is symmetric if A=ATA = A^T.

DefinitionDeterminant

The determinant det⁡(A)\det(A) (also written ∣A∣|A|) is a scalar defined for square matrices. For a 2×22\times 2 matrix:

5
det⁡ ⁣[abcd]=ad−bc\quad \det\!\begin{bmatrix} a & b \\ c & d \end{bmatrix} = ad - bc

Derivation hint: Product of the main diagonal minus product of the anti-diagonal. For a 3×33\times 3 matrix, by cofactor expansion along the first row:

6
det⁡(A)=a11∣a22a23a32a33∣−a12∣a21a23a31a33∣+a13∣a21a22a31a32∣\quad \det(A) = a_{11}\begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33}\end{vmatrix} - a_{12}\begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33}\end{vmatrix} + a_{13}\begin{vmatrix} a_{21} & a_{22} \\ a_{31} & a_{32}\end{vmatrix}

Derivation hint: Each term is an entry times its minor (the determinant of the 2×22\times2 matrix left after deleting that entry's row and column), with alternating signs +,−,++,-,+ from the cofactor pattern (−1)i+j(-1)^{i+j}.

TheoremInvertibility Criterion

A square matrix AA is invertible (has a matrix A−1A^{-1} with AA−1=A−1A=IAA^{-1}=A^{-1}A=I) if and only if

7
det⁡(A)≠0\quad \det(A) \neq 0

Derivation hint: If det⁡(A)=0\det(A)=0 the transformation collapses dimension and cannot be reversed; if det⁡(A)≠0\det(A)\neq0 an explicit inverse exists (see below). When invertible, the inverse of a 2×22\times2 matrix is:

8
A−1=1ad−bc[d−b−ca]\quad A^{-1} = \frac{1}{ad-bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}

Derivation hint: Swap the diagonal entries, negate the off-diagonal entries, and divide by det⁡(A)=ad−bc\det(A)=ad-bc. Verify by checking AA−1=IAA^{-1}=I.

TheoremProperties of Determinants

For square matrices AA, BB of the same order:

9
det⁡(AB)=det⁡(A)det⁡(B),det⁡(AT)=det⁡(A),det⁡(A−1)=1det⁡(A)\quad \det(AB) = \det(A)\det(B), \qquad \det(A^T)=\det(A), \qquad \det(A^{-1}) = \frac{1}{\det(A)}

Derivation hint: The multiplicative property follows because applying two transformations multiplies their area-scaling factors. Transposing reflects entries across the diagonal without changing the signed volume.

Why It Holds / Derivation

ProofThe 2×2 Inverse Formula

We verify equation [8]. Let A=[abcd]A=\begin{bmatrix} a&b\\c&d\end{bmatrix} with Δ=ad−bc≠0\Delta = ad-bc \neq 0. 1. Propose the candidate inverse B=1Δ[d−b−ca]B = \frac{1}{\Delta}\begin{bmatrix} d & -b \\ -c & a\end{bmatrix}. 2. Compute ABAB:

10
AB=1Δ[abcd][d−b−ca]=1Δ[ad−bc−ab+bacd−dc−cb+da]\quad AB = \frac{1}{\Delta}\begin{bmatrix} a&b\\c&d\end{bmatrix}\begin{bmatrix} d&-b\\-c&a\end{bmatrix} = \frac{1}{\Delta}\begin{bmatrix} ad-bc & -ab+ba \\ cd-dc & -cb+da \end{bmatrix}

Derivation hint: Apply the row-times-column rule [4] entry by entry. 3. Simplify the entries:

11
AB=1Δ[ad−bc00ad−bc]=1Δ[Δ00Δ]=[1001]=I\quad AB = \frac{1}{\Delta}\begin{bmatrix} ad-bc & 0 \\ 0 & ad-bc \end{bmatrix} = \frac{1}{\Delta}\begin{bmatrix} \Delta & 0 \\ 0 & \Delta \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = I

Derivation hint: Off-diagonal terms cancel; diagonal terms both equal Δ\Delta, which divides out. 4. Conclude: since AB=IAB = I (and symmetrically BA=IBA = I), B=A−1B = A^{-1}. This is impossible if Δ=0\Delta = 0 because we cannot divide by zero — confirming the invertibility criterion [7]. ■\blacksquare

∎
ProofCramer's Rule for 2×2 Systems

Consider the system Ax=bA\mathbf{x}=\mathbf{b} where [abcd][xy]=[ef]\begin{bmatrix} a&b\\c&d\end{bmatrix}\begin{bmatrix} x\\y\end{bmatrix}=\begin{bmatrix} e\\f\end{bmatrix}. 1. Multiply both sides on the left by A−1A^{-1} (valid when Δ≠0\Delta \neq 0):

12
x=A−1b=1Δ[d−b−ca][ef]\quad \mathbf{x} = A^{-1}\mathbf{b} = \frac{1}{\Delta}\begin{bmatrix} d & -b \\ -c & a\end{bmatrix}\begin{bmatrix} e\\f\end{bmatrix}

Derivation hint: A−1Ax=Ix=xA^{-1}A\mathbf{x}=I\mathbf{x}=\mathbf{x} on the left; substitute formula [8]. 2. Extract each component:

13
x=de−bfad−bc=∣ebfd∣∣abcd∣,y=af−cead−bc=∣aecf∣∣abcd∣\quad x = \frac{de - bf}{ad-bc} = \frac{\begin{vmatrix} e&b\\f&d\end{vmatrix}}{\begin{vmatrix} a&b\\c&d\end{vmatrix}}, \qquad y = \frac{af - ce}{ad-bc} = \frac{\begin{vmatrix} a&e\\c&f\end{vmatrix}}{\begin{vmatrix} a&b\\c&d\end{vmatrix}}

Derivation hint: Each numerator is the determinant of AA with the relevant column replaced by b\mathbf{b} — this is Cramer's Rule. ■\blacksquare

∎
mathematician · Arthur Cayley | 1821–1895

The English mathematician Arthur Cayley founded the theory of matrices as abstract objects in his 1858 "A Memoir on the Theory of Matrices," where he treated matrices as entities with their own algebra — defining addition, multiplication, and the inverse, and stating what we now call the Cayley–Hamilton theorem. Cayley realized that a matrix could be manipulated as a single symbol obeying consistent laws, decoupling the concept from the systems of equations that motivated it. Remarkably, he developed much of this while working as a lawyer for fourteen years, publishing hundreds of mathematical papers in his spare time before becoming a professor at Cambridge.

Building Intuition

🧠 Intuition

Picture a 2×22\times2 matrix as a machine that grabs the entire 2D plane and stretches, rotates, or shears it — but keeps the origin pinned and keeps straight lines straight. The two columns of the matrix tell you exactly where the basis vectors [10]\begin{bmatrix}1\\0\end{bmatrix} and [01]\begin{bmatrix}0\\1\end{bmatrix} land. The determinant is then the (signed) area of the parallelogram those two transformed vectors span. If det⁡=3\det = 3, areas triple; if det⁡=1\det = 1, areas are preserved; if det⁡=−2\det = -2, areas double and the plane is flipped (orientation reversed). If det⁡=0\det = 0, the two columns are parallel — they squash the whole plane onto a single line, destroying all area, and that information loss is exactly why you cannot invert.

Figure
A 2×2 matrix maps the unit square to a parallelogram whose signed area equals the determinant
x y unit square area = 1 col 1 = (3,0) col 2 = (1,2) parallelogram area = |det| = 6 A = [[3,1],[0,2]], det = 3·2 − 1·0 = 6

Worked Examples

ExampleMultiplying Matrices and Computing an Inverse

Given: A=[2143]A = \begin{bmatrix} 2 & 1 \\ 4 & 3 \end{bmatrix} and B=[1052]B = \begin{bmatrix} 1 & 0 \\ 5 & 2 \end{bmatrix}. Find ABAB, then find A−1A^{-1}.

Step 1 — Compute ABAB using equation [4]. Each entry is row of AA dotted with column of BB:

  • (AB)11=2⋅1+1⋅5=7(AB)_{11} = 2\cdot1 + 1\cdot5 = 7
  • (AB)12=2⋅0+1⋅2=2(AB)_{12} = 2\cdot0 + 1\cdot2 = 2
  • (AB)21=4⋅1+3⋅5=19(AB)_{21} = 4\cdot1 + 3\cdot5 = 19
  • (AB)22=4⋅0+3⋅2=6(AB)_{22} = 4\cdot0 + 3\cdot2 = 6
14
AB=[72196]\quad AB = \begin{bmatrix} 7 & 2 \\ 19 & 6 \end{bmatrix}

Derivation hint: Inner dimensions match (both 2×22\times2); apply the dot-product rule four times.

Step 2 — Compute det⁡(A)\det(A) using equation [5]: det⁡(A)=(2)(3)−(1)(4)=6−4=2\det(A) = (2)(3) - (1)(4) = 6 - 4 = 2. Since 2≠02 \neq 0, AA is invertible.

Step 3 — Apply the inverse formula [8]: swap diagonal entries, negate off-diagonals, divide by det⁡=2\det = 2:

15
A−1=12[3−1−42]=[1.5−0.5−21]\quad A^{-1} = \frac{1}{2}\begin{bmatrix} 3 & -1 \\ -4 & 2 \end{bmatrix} = \begin{bmatrix} 1.5 & -0.5 \\ -2 & 1 \end{bmatrix}

Derivation hint: Use 1ad−bc[d−b−ca]\frac{1}{ad-bc}\begin{bmatrix} d&-b\\-c&a\end{bmatrix} with a=2,b=1,c=4,d=3a=2,b=1,c=4,d=3.

AB=[72196],A−1=[1.5−0.5−21]\boxed{AB = \begin{bmatrix} 7 & 2 \\ 19 & 6 \end{bmatrix}, \qquad A^{-1} = \begin{bmatrix} 1.5 & -0.5 \\ -2 & 1 \end{bmatrix}}

(dimensionless — these are pure numerical matrices)

ExampleSolving a Linear System with Cramer's Rule

Given: the system

{3x+2y=16x−y=2\begin{cases} 3x + 2y = 16 \\ x - y = 2 \end{cases}

Solve using determinants.

Step 1 — Write the coefficient matrix A=[321−1]A = \begin{bmatrix} 3 & 2 \\ 1 & -1 \end{bmatrix} and constant vector b=[162]\mathbf{b}=\begin{bmatrix}16\\2\end{bmatrix}.

Step 2 — Compute det⁡(A)=(3)(−1)−(2)(1)=−3−2=−5\det(A) = (3)(-1) - (2)(1) = -3 - 2 = -5. Nonzero, so a unique solution exists.

Step 3 — Replace column 1 with b\mathbf{b} for xx (equation [13]):

16
x=∣1622−1∣−5=(16)(−1)−(2)(2)−5=−16−4−5=−20−5=4\quad x = \frac{\begin{vmatrix} 16 & 2 \\ 2 & -1 \end{vmatrix}}{-5} = \frac{(16)(-1)-(2)(2)}{-5} = \frac{-16-4}{-5} = \frac{-20}{-5} = 4

Derivation hint: Numerator is det⁡\det of AA with its first column replaced by b\mathbf{b}.

Step 4 — Replace column 2 with b\mathbf{b} for yy:

17
y=∣31612∣−5=(3)(2)−(16)(1)−5=6−16−5=−10−5=2\quad y = \frac{\begin{vmatrix} 3 & 16 \\ 1 & 2 \end{vmatrix}}{-5} = \frac{(3)(2)-(16)(1)}{-5} = \frac{6-16}{-5} = \frac{-10}{-5} = 2

Derivation hint: Numerator is det⁡\det of AA with its second column replaced by b\mathbf{b}.

Check: 3(4)+2(2)=12+4=163(4)+2(2)=12+4=16 ✓ and 4−2=24-2=2 ✓.

x=4,y=2\boxed{x = 4, \qquad y = 2}

Common Misconceptions

⚠️ Common mistake

Matrix multiplication is not commutative. In general AB≠BAAB \neq BA. Using the matrices from Example 1, BA=[1052][2143]=[211811]BA = \begin{bmatrix}1&0\\5&2\end{bmatrix}\begin{bmatrix}2&1\\4&3\end{bmatrix} = \begin{bmatrix}2&1\\18&11\end{bmatrix}, which differs from AB=[72196]AB = \begin{bmatrix}7&2\\19&6\end{bmatrix}. Also beware: det⁡(A+B)≠det⁡(A)+det⁡(B)\det(A+B) \neq \det(A) + \det(B) — the determinant is not additive, only multiplicative (det⁡(AB)=det⁡(A)det⁡(B)\det(AB)=\det(A)\det(B)). And the inverse of a product reverses order: (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}, not A−1B−1A^{-1}B^{-1}.

Counterexample

One might guess that if AB=OAB = O (the zero matrix), then A=OA = O or B=OB = O — true for ordinary numbers, false for matrices. Take

18
A=[1000],B=[0001]  ⇒  AB=[0000]=O\quad A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \quad B = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \;\Rightarrow\; AB = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = O

Derivation hint: Both AA and BB are nonzero, yet their product is zero — possible because both are non-invertible (det⁡A=det⁡B=0\det A = \det B = 0). Such matrices are called zero divisors.

Connections

connection

Matrices and determinants sit at the heart of Linear Algebra and connect outward in many directions. A matrix is a Linear Transformation expressed in coordinates, so its columns are images of basis vectors. The determinant generalizes the Cross Product and vector area formulas — indeed the 3×33\times3 determinant [6] reproduces the scalar triple product giving the volume of a parallelepiped. Solving Ax=bA\mathbf{x}=\mathbf{b} links matrices to Systems of Linear Equations and the method of Gaussian Elimination. The condition det⁡(A−λI)=0\det(A-\lambda I)=0 defines Eigenvalues and Eigenvectors, the gateway to diagonalization and to applications in differential equations, quantum mechanics, and data science via Principal Component Analysis.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- c. 200 BCE — Han Dynasty China: The Nine Chapters on the Mathematical Art solves simultaneous equations using a method essentially identical to Gaussian elimination on a coefficient array — the earliest matrix-like reasoning.
- 1683 — Seki Takakazu (Japan): introduces determinants to solve systems of equations, predating European work.
- 1693 — Gottfried Leibniz: in correspondence with l'Hôpital, uses determinants to characterize when linear systems have solutions, developing index notation.
- 1750 — Gabriel Cramer: publishes Cramer's Rule, expressing solutions of linear systems as ratios of determinants.
- 1812 — Cauchy: gives the term determinant its modern meaning, proves the multiplication theorem det⁡(AB)=det⁡(A)det⁡(B)\det(AB)=\det(A)\det(B), and systematizes the theory.
- 1850 — James Joseph Sylvester: coins the word matrix (Latin for "womb") to describe the array from which determinant minors are born.
- 1858 — Arthur Cayley: publishes the Memoir on the Theory of Matrices, founding matrix algebra as an independent subject and stating the Cayley–Hamilton theorem.
- 1888 — Wilhelm Jordan: popularizes the Gauss–Jordan elimination method for systematically inverting matrices and solving systems.
- 20th century — onward: matrices become foundational to quantum mechanics (Heisenberg's 1925 matrix mechanics), numerical computing, and the entire edifice of modern data science.

Subtleties & Limits

open-problem

At the introductory level, the deep subtleties involve computation and generalization. Computing a determinant by cofactor expansion [6] requires roughly n!n! multiplications — astronomically slow for large nn — so practical algorithms use LU-decomposition (Gaussian elimination), reducing cost to about n3n^3 operations; the optimal exponent for matrix multiplication itself remains an open research question (currently around 2.372.37, conjectured to approach 22). Numerically, near-singular matrices (tiny but nonzero determinant) cause catastrophic round-off errors, quantified by the condition number — a matrix can be invertible in theory yet useless in practice. Finally, the determinant generalizes beyond numbers: over abstract rings and in infinite dimensions (functional analysis) the notion fragments into regularized determinants, and even the seemingly simple question of whether a large integer matrix is invertible touches on hard problems in computational complexity.

See Also

Linear Algebra · Systems of Linear Equations · Eigenvalues and Eigenvectors · Linear Transformations · Vectors · Cross Product · Gaussian Elimination · Cramer's Rule · Vector Spaces