Matrices: Operations, Inverses, Determinants

⚡ Key Takeaways

A matrix is a rectangular array of numbers; matrices can be added, scaled, and multiplied, and square matrices may possess an inverse (an "undo" matrix) and a single number called the determinant that detects invertibility. Key result: a square matrix is invertible if and only if its determinant is nonzero, and the inverse exists uniquely when it does. Used everywhere systems of linear equations appear — graphics, physics, statistics, economics. Formalized by Cayley, Sylvester, and Cramer between the 18th and 19th centuries.

💡 The Core Insight

A matrix is best understood not as a static grid of numbers but as a transformation — a rule that turns input vectors into output vectors. Multiplication composes transformations, the determinant measures how much the transformation scales area or volume (and whether it flips orientation), and the inverse is the transformation that undoes the original. A zero determinant means the transformation collapses space (squashing a region to zero area), which is exactly why no inverse can exist — you cannot un-squash what has been flattened.

Formal Statement

DefinitionMatrix

An m×nm \times n matrix AA is a rectangular array of numbers with mm rows and nn columns. The entry in row ii, column jj is written aija_{ij}:

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; the first index always names the row, the second the column ("row before column"). The matrix is square if m=nm = n. The main diagonal consists of the entries aiia_{ii}.

DefinitionMatrix Addition and Scalar Multiplication

For two m×nm \times n matrices AA and BB, and a scalar cc:

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

Derivation hint: both operations act entry by entry; addition requires identical shapes. These operations make matrices of a fixed shape behave like vectors: associative, commutative addition, with a zero matrix and additive inverses.

DefinitionMatrix Multiplication

If AA is m×nm \times n and BB is n×pn \times p (inner dimensions match), the product ABAB is the m×pm \times p matrix with entries:

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

Derivation hint: take the dot product of row ii of AA with column jj of BB. The entry (AB)ij(AB)_{ij} is row ii of AA "marched along" column jj of BB, multiplying paired entries and summing.

DefinitionIdentity Matrix

The n×nn \times n identity matrix InI_n has 1's on the main diagonal and 0's elsewhere:

4
(In)ij={1i=j0i≠j\quad (I_n)_{ij} = \begin{cases} 1 & i = j \\ 0 & i \neq j \end{cases}

Derivation hint: it is the multiplicative neutral element — AI=AAI = A and IA=AIA = A whenever shapes allow.

DefinitionInverse Matrix

A square n×nn \times n matrix AA is invertible (or nonsingular) if there exists a matrix A−1A^{-1} with:

5
AA−1=A−1A=In\quad A A^{-1} = A^{-1} A = I_n

Derivation hint: the inverse undoes AA; for square matrices, a one-sided inverse is automatically two-sided. If no such A−1A^{-1} exists, AA is called singular.

DefinitionDeterminant — 2×2 and 3×3

For a 2×22 \times 2 matrix:

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

Derivation hint: it is the signed area of the parallelogram spanned by the rows (or columns). For a 3×33 \times 3 matrix, expand along the first row (cofactor expansion):

7
det⁡[abcdefghi]=a(ei−fh)−b(di−fg)+c(dh−eg)\quad \det\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} = a(ei - fh) - b(di - fg) + c(dh - eg)

Derivation hint: alternate signs +,−,++, -, +; each term is an entry times the determinant of the 2×22\times2 minor obtained by deleting its row and column.

TheoremInverse of a 2×2 Matrix

Let A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}. Then AA is invertible if and only if det⁡A=ad−bc≠0\det A = ad - bc \neq 0, and:

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, divide by the determinant.

TheoremInvertibility Criterion

A square matrix AA is invertible if and only if det⁡A≠0\det A \neq 0. Moreover, the determinant of a product satisfies:

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

Derivation hint: products of scaling factors multiply; an inverse must scale by the reciprocal.

Why It Holds / Derivation

ProofThe 2×2 Inverse Formula

We verify that the claimed inverse [8] works.

Step 1. Let A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} and propose B=1ad−bc[d−b−ca]B = \dfrac{1}{ad-bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}, assuming ad−bc≠0ad - bc \neq 0.

Step 2. Compute ABAB by rule [3]:

AB=1ad−bc[abcd][d−b−ca].AB = \frac{1}{ad-bc}\begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}.

Step 3. Entry (1,1)(1,1): ad+b(−c)=ad−bcad + b(-c) = ad - bc. Entry (1,2)(1,2): a(−b)+ba=0a(-b) + ba = 0. Entry (2,1)(2,1): cd+d(−c)=0cd + d(-c) = 0. Entry (2,2)(2,2): c(−b)+da=ad−bcc(-b) + da = ad - bc.

Step 4. Therefore

AB=1ad−bc[ad−bc00ad−bc]=[1001]=I2.AB = \frac{1}{ad-bc}\begin{bmatrix} ad-bc & 0 \\ 0 & ad-bc \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = I_2.

Step 5. The identical computation gives BA=I2BA = I_2, so B=A−1B = A^{-1}.

Step 6. If ad−bc=0ad - bc = 0, the formula's division is undefined, and one can show the columns of AA are proportional, so AA collapses the plane onto a line — no inverse can exist. ■\blacksquare

∎
ProofDeterminant Detects Singularity (sketch)

Step 1. Geometrically, ∣det⁡A∣|\det A| equals the area (2D) or volume (3D) scaling factor of the transformation AA.

Step 2. If det⁡A=0\det A = 0, the transformation squashes the plane into a line (or space into a plane), reducing area to zero — distinct inputs collapse to the same output.

Step 3. A transformation that is not one-to-one cannot be reversed, so no inverse exists.

Step 4. Conversely, if det⁡A≠0\det A \neq 0, no collapse occurs; the transformation is reversible, and the explicit inverse (via the adjugate formula) exists. ■\blacksquare

∎
mathematician · Arthur Cayley | 1821–1895

The English mathematician Arthur Cayley founded matrix algebra as a subject in its own right. In his 1858 Memoir on the Theory of Matrices, he treated matrices as objects that could be added and multiplied, introduced the inverse, and stated what became the Cayley–Hamilton theorem (every square matrix satisfies its own characteristic equation). Cayley collaborated closely with James Joseph Sylvester, who coined the very word "matrix" (Latin for "womb") in 1850, picturing it as the array from which determinants are born.

Building Intuition

🧠 Intuition

Think of a 2×22\times2 matrix as instructions for transforming a sheet of graph paper. The two columns tell you where the basis arrows i^=(1,0)\hat{i} = (1,0) and j^=(0,1)\hat{j} = (0,1) land after the transformation. Once you know where those two arrows go, every point's destination is determined. The determinant is the area of the parallelogram formed by the two transformed arrows. If that area is 1, the transformation preserves size; if it's 3, areas triple; if it's negative, the plane gets flipped over (orientation reversed); if it's 0, the two arrows became parallel and the whole plane has been crushed onto a single line.

Multiplication is doing one transformation, then another — composition. It's not commutative because rotating-then-stretching generally lands you somewhere different from stretching-then-rotating. The inverse is the transformation that puts every arrow back where it started — and you can only do that if no flattening occurred, i.e. the determinant isn't zero.

Figure
A 2×2 matrix transforms the unit square; the determinant is the area of the resulting parallelogram.
x y unit square col 1 = (a, c) col 2 = (b, d) area = |det A|

Worked Examples

ExampleMultiplying Two Matrices

Given: A=[1234]A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, B=[5678]B = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}. Find ABAB.

Step 1 — Check dimensions. AA is 2×22\times2, BB is 2×22\times2; inner dimensions match, product is 2×22\times2.

Step 2 — Entry (1,1): row 1 of AA dot column 1 of BB: (1)(5)+(2)(7)=5+14=19(1)(5) + (2)(7) = 5 + 14 = 19.

Step 3 — Entry (1,2): (1)(6)+(2)(8)=6+16=22(1)(6) + (2)(8) = 6 + 16 = 22.

Step 4 — Entry (2,1): (3)(5)+(4)(7)=15+28=43(3)(5) + (4)(7) = 15 + 28 = 43.

Step 5 — Entry (2,2): (3)(6)+(4)(8)=18+32=50(3)(6) + (4)(8) = 18 + 32 = 50.

AB=[19224350]\boxed{AB = \begin{bmatrix} 19 & 22 \\ 43 & 50 \end{bmatrix}}

Check non-commutativity: computing BABA gives [23343146]≠AB\begin{bmatrix} 23 & 34 \\ 31 & 46 \end{bmatrix} \neq AB.

ExampleDeterminant, Inverse, and Solving a System

Given: Solve {2x+3y=85x+4y=13\begin{cases} 2x + 3y = 8 \\ 5x + 4y = 13 \end{cases} using the inverse. Coefficient matrix A=[2354]A = \begin{bmatrix} 2 & 3 \\ 5 & 4 \end{bmatrix}, b=[813]\mathbf{b} = \begin{bmatrix} 8 \\ 13 \end{bmatrix}.

Step 1 — Determinant: det⁡A=(2)(4)−(3)(5)=8−15=−7\det A = (2)(4) - (3)(5) = 8 - 15 = -7. Nonzero, so AA is invertible.

Step 2 — Inverse by formula [8]:

A−1=1−7[4−3−52]=[−473757−27].A^{-1} = \frac{1}{-7}\begin{bmatrix} 4 & -3 \\ -5 & 2 \end{bmatrix} = \begin{bmatrix} -\tfrac{4}{7} & \tfrac{3}{7} \\ \tfrac{5}{7} & -\tfrac{2}{7} \end{bmatrix}.

Step 3 — Solve x=A−1b\mathbf{x} = A^{-1}\mathbf{b}:

x=−47(8)+37(13)=−32+397=77=1.x = -\tfrac{4}{7}(8) + \tfrac{3}{7}(13) = \tfrac{-32 + 39}{7} = \tfrac{7}{7} = 1.
y=57(8)−27(13)=40−267=147=2.y = \tfrac{5}{7}(8) - \tfrac{2}{7}(13) = \tfrac{40 - 26}{7} = \tfrac{14}{7} = 2.
x=1,y=2\boxed{x = 1,\quad y = 2}

Check: 2(1)+3(2)=82(1) + 3(2) = 8 ✓ and 5(1)+4(2)=135(1) + 4(2) = 13 ✓.

Common Misconceptions

⚠️ Common mistake

Matrix multiplication is NOT commutative. In general AB≠BAAB \neq BA, and one product may exist while the other does not (if shapes don't align both ways). Never reorder matrices freely as you would numbers.

You cannot "divide" by a matrix. There is no division operator; you multiply by the inverse — and you must respect order: AX=BAX = B gives X=A−1BX = A^{-1}B (left multiply), not BA−1BA^{-1}.

A zero determinant does not mean a zero matrix. It means the matrix is singular (non-invertible) — e.g. [1224]\begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix} has determinant 0 but no zero entries.

Counterexample

Claim (false): "If AB=0AB = 0 then A=0A = 0 or B=0B = 0." For ordinary numbers this is true, but matrices admit zero divisors:

A=[1000],B=[0001],AB=[0000].A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \quad B = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}, \quad AB = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}.

Neither AA nor BB is the zero matrix, yet their product is. This is impossible for invertible matrices but routine for singular ones.

Connections

connection

Matrices are the computational engine behind Systems of Linear Equations — solving Ax=bA\mathbf{x} = \mathbf{b} is exactly inverting or row-reducing AA. They generalize the idea of a Vector and provide the language for Linear Transformations, where each matrix is a transformation. The determinant connects to Area and Volume Scaling in geometry and to the Cross Product in three dimensions (which is itself a determinant). At a deeper level, matrices lead into Eigenvalues and Eigenvectors, where one seeks the special directions a matrix merely stretches without rotating.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- c. 200 BCE — China: The Nine Chapters on the Mathematical Art solves simultaneous equations using a grid of coefficients and column operations — essentially Gaussian elimination, two millennia early.
- 1683 — Japan & 1693 — Europe: Seki Takakazu and, independently, Gottfried Leibniz introduce determinants to study systems of equations.
- 1750 — Gabriel Cramer: Publishes Cramer's Rule, expressing solutions of linear systems as ratios of determinants.
- 1812 — Cauchy: Augustin-Louis Cauchy gives the modern definition of determinant and proves the product rule det⁡(AB)=det⁡Adet⁡B\det(AB) = \det A \det B.
- 1850 — James Joseph Sylvester: Coins the term "matrix" for the array generating minors and determinants.
- 1858 — Arthur Cayley: Memoir on the Theory of Matrices establishes matrix algebra — addition, multiplication, inverses — as an independent theory.
- 1879 — Frobenius: Georg Frobenius develops the theory of matrix rank and canonical forms.
- 1925 — Heisenberg & Born: Matrix mechanics formulates quantum theory entirely in terms of (infinite) matrices, giving the abstract subject deep physical meaning.
- 1947–present: With electronic computers, matrix algorithms (LU decomposition, QR, SVD) become the backbone of scientific computing.

Subtleties & Limits

open-problem

Although the 2×22\times2 and 3×33\times3 determinant and inverse formulas are clean, they explode in size for large matrices: the general "expansion by minors" requires roughly n!n! operations, hopeless even for n=20n = 20. Practical computation instead uses Gaussian elimination (∼n3\sim n^3 operations), but rounding errors in floating-point arithmetic can make a matrix that is mathematically invertible behave as singular — this is the study of numerical conditioning. The threshold between "invertible" and "effectively singular" is genuinely blurry on real computers. A live research frontier asks: what is the fastest possible algorithm for matrix multiplication? The naïve method is n3n^3; Strassen (1969) achieved ∼n2.81\sim n^{2.81}, and the current record sits near n2.37n^{2.37}, but whether one can reach the conjectured ideal of essentially n2n^2 remains open.

See Also

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