Matrices (Precalculus)

⚡ Key Takeaways

A matrix is a rectangular array of numbers arranged in rows and columns. Matrices encode linear systems, transformations, and data tables; they can be added, scaled, multiplied, inverted, and reduced. Used everywhere from solving systems of equations to computer graphics, economics, and statistics. Formalized in the 19th century by Cayley, Sylvester, and others.

💡 The Core Insight

A matrix is simultaneously three things: (1) a bookkeeping table of numbers, (2) a compact encoding of a linear system Ax=bA\mathbf{x} = \mathbf{b}, and (3) a machine that transforms vectors by multiplication. Mastering matrices means fluidly switching among these three viewpoints. The operations of row reduction solve systems; the operation of multiplication composes transformations; the inverse undoes them.

Formal Statement

DefinitionMatrix and Its Dimensions

An m×nm \times n matrix AA 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: The entry aija_{ij} sits in row ii (counted top to bottom) and column jj (counted left to right); the pair (m,n)(m,n) is the matrix's <strong>order</strong> or <strong>dimension</strong>. Here aija_{ij} denotes the entry in row ii, column jj. If m=nm = n the matrix is square of order nn. A 1×n1 \times n matrix is a row vector; an m×1m \times 1 matrix is a column vector.

DefinitionMatrix Addition and Scalar Multiplication

For two matrices AA and BB of the same order m×nm \times n, 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 <strong>entry by entry</strong>; addition requires matching dimensions, scalar multiplication does not.

DefinitionMatrix Multiplication

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

3
(AB)ik=∑j=1naij bjk\quad (AB)_{ik} = \sum_{j=1}^{n} a_{ij}\, b_{jk}

Derivation hint: Entry (i,k)(i,k) is the <strong>dot product</strong> of row ii of AA with column kk of BB; this is the rule that makes matrix multiplication encode composition of linear transformations.

DefinitionIdentity and Inverse

The n×nn \times n identity matrix InI_n has 11s on the main diagonal and 00s elsewhere. A square matrix AA is invertible if there exists A−1A^{-1} with:

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

Derivation hint: InI_n acts as the multiplicative "11"; the inverse exists exactly when det⁡A≠0\det A \neq 0.

TheoremDeterminant of a 2×2 Matrix and Its Inverse

For A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, the determinant is det⁡A=ad−bc\det A = ad - bc, and when det⁡A≠0\det A \neq 0:

5
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 the determinant; verify by computing AA−1=IAA^{-1} = I.

Why It Holds / Derivation

ProofThe 2×2 Inverse Formula

We seek A−1=[xyzw]A^{-1} = \begin{bmatrix} x & y \\ z & w \end{bmatrix} such that AA−1=IAA^{-1} = I.

Step 1. Write the matrix equation:

6
[abcd][xyzw]=[1001]\quad \begin{bmatrix} a & b \\ c & d \end{bmatrix}\begin{bmatrix} x & y \\ z & w \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}

Derivation hint: Multiply using rule [3] to get four scalar equations.

Step 2. The four resulting equations are ax+bz=1ax + bz = 1, ay+bw=0ay + bw = 0, cx+dz=0cx + dz = 0, cy+dw=1cy + dw = 1. Solving the first column system {ax+bz=1, cx+dz=0}\{ax+bz=1,\ cx+dz=0\}:

7
x=dad−bc,z=−cad−bc\quad x = \frac{d}{ad-bc}, \qquad z = \frac{-c}{ad-bc}

Derivation hint: Eliminate by cross-multiplication; the common denominator ad−bcad-bc emerges naturally.

Step 3. Solving the second column system {ay+bw=0, cy+dw=1}\{ay+bw=0,\ cy+dw=1\}:

8
y=−bad−bc,w=aad−bc\quad y = \frac{-b}{ad-bc}, \qquad w = \frac{a}{ad-bc}

Derivation hint: Same elimination procedure applied to the right-hand column of II.

Step 4. Assembling x,y,z,wx, y, z, w reproduces formula [5]. The procedure divides by ad−bcad - bc, which fails exactly when det⁡A=0\det A = 0 — proving invertibility requires a nonzero determinant. ■\blacksquare

∎
mathematician · Arthur Cayley | 1821–1895

The English mathematician Arthur Cayley is regarded as the founder of matrix theory as an abstract subject. In his 1858 Memoir on the Theory of Matrices he treated matrices as objects in their own right, defining their addition, multiplication, and inverses, and stating (for 2×22\times 2 and 3×33\times 3 cases) what became the Cayley–Hamilton theorem: every square matrix satisfies its own characteristic equation. A barrister by profession for fourteen years, Cayley published nearly a thousand papers. His collaborator James Joseph Sylvester coined the word "matrix" in 1850, picturing it as the "womb" (Latin matrix) from which determinants are born.

Building Intuition

🧠 Intuition

Think of a matrix three ways at once. As a table: a spreadsheet of numbers — sales by month, pixel brightnesses, coefficients of equations. As a system solver: the array [231−1]\begin{bmatrix} 2 & 3 \\ 1 & -1 \end{bmatrix} paired with right-hand side [81]\begin{bmatrix} 8 \\ 1 \end{bmatrix} is the system 2x+3y=8, x−y=12x+3y=8,\ x-y=1. As a transformer: multiplying a vector by a matrix stretches, rotates, shears, or projects it. The reason multiplication isn't commutative becomes obvious here: rotating then reflecting is generally not the same as reflecting then rotating. The determinant measures how much the transformation scales areas; when it's zero, the transformation collapses space onto a line (or point), destroying information, which is exactly why you can't invert it.

Figure
A 2×2 matrix transforming the unit square into a parallelogram; the determinant equals the new area.
x y unit sq. area = det A col 1 col 2 A = [col1 | col2] maps square → parallelogram

Worked Examples

ExampleSolving a Linear System with the Inverse

Given: Solve {2x+3y=8x−y=1\begin{cases} 2x + 3y = 8 \\ x - y = 1 \end{cases} using a matrix inverse.

Step 1. Write as Ax=bA\mathbf{x} = \mathbf{b} with A=[231−1]A = \begin{bmatrix} 2 & 3 \\ 1 & -1 \end{bmatrix}, b=[81]\mathbf{b} = \begin{bmatrix} 8 \\ 1 \end{bmatrix}.

Step 2. Compute det⁡A=(2)(−1)−(3)(1)=−2−3=−5≠0\det A = (2)(-1) - (3)(1) = -2 - 3 = -5 \neq 0, so A−1A^{-1} exists.

Step 3. By formula [5]:

A−1=1−5[−1−3−12]=[1/53/51/5−2/5]A^{-1} = \frac{1}{-5}\begin{bmatrix} -1 & -3 \\ -1 & 2 \end{bmatrix} = \begin{bmatrix} 1/5 & 3/5 \\ 1/5 & -2/5 \end{bmatrix}

Step 4. Multiply: x=A−1b=[1/53/51/5−2/5][81]=[8/5+3/58/5−2/5]=[11/56/5]\mathbf{x} = A^{-1}\mathbf{b} = \begin{bmatrix} 1/5 & 3/5 \\ 1/5 & -2/5 \end{bmatrix}\begin{bmatrix} 8 \\ 1 \end{bmatrix} = \begin{bmatrix} 8/5 + 3/5 \\ 8/5 - 2/5 \end{bmatrix} = \begin{bmatrix} 11/5 \\ 6/5 \end{bmatrix}.

x=115=2.2,y=65=1.2\boxed{x = \tfrac{11}{5} = 2.2, \qquad y = \tfrac{6}{5} = 1.2}

Check: 2(2.2)+3(1.2)=4.4+3.6=82(2.2) + 3(1.2) = 4.4 + 3.6 = 8 ✓ and 2.2−1.2=12.2 - 1.2 = 1 ✓.

ExampleMatrix Multiplication and Non-Commutativity

Given: A=[1201]A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}, B=[1031]B = \begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix}. Compute ABAB and BABA.

Step 1. Compute ABAB using rule [3], row-by-column:

AB=[(1)(1)+(2)(3)(1)(0)+(2)(1)(0)(1)+(1)(3)(0)(0)+(1)(1)]=[7231]AB = \begin{bmatrix} (1)(1)+(2)(3) & (1)(0)+(2)(1) \\ (0)(1)+(1)(3) & (0)(0)+(1)(1) \end{bmatrix} = \begin{bmatrix} 7 & 2 \\ 3 & 1 \end{bmatrix}

Step 2. Compute BABA:

BA=[(1)(1)+(0)(0)(1)(2)+(0)(1)(3)(1)+(1)(0)(3)(2)+(1)(1)]=[1237]BA = \begin{bmatrix} (1)(1)+(0)(0) & (1)(2)+(0)(1) \\ (3)(1)+(1)(0) & (3)(2)+(1)(1) \end{bmatrix} = \begin{bmatrix} 1 & 2 \\ 3 & 7 \end{bmatrix}

Step 3. Compare:

AB=[7231]≠[1237]=BA\boxed{AB = \begin{bmatrix} 7 & 2 \\ 3 & 1 \end{bmatrix} \neq \begin{bmatrix} 1 & 2 \\ 3 & 7 \end{bmatrix} = BA}

This concretely demonstrates that matrix multiplication is not commutative.

Common Misconceptions

⚠️ Multiplication Pitfalls
  • Dimensions must align. You can only form ABAB when the number of columns of AA equals the number of rows of BB. A 2×32\times 3 times a 2×32\times 3 is undefined.
  • Order matters. AB≠BAAB \neq BA in general; never silently swap factors.
  • No automatic cancellation. AB=ACAB = AC does not imply B=CB = C unless AA is invertible.
  • There is no matrix division. "Dividing by AA" means multiplying by A−1A^{-1} — and you must choose a side: A−1B≠BA−1A^{-1}B \neq BA^{-1} in general.
  • Determinant zero blocks inversion. If det⁡A=0\det A = 0, the matrix is singular and has no inverse.
CounterexampleNonzero Matrices with Zero Product

With ordinary numbers, xy=0xy = 0 forces x=0x = 0 or y=0y = 0. Matrices break this. Let

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

Then AB=[0000]AB = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}, the zero matrix, even though neither AA nor BB is zero. Such matrices are zero divisors; both are singular (det⁡=0\det = 0), consistent with the warning above.

Connections

connection

Matrices sit at the crossroads of several precalculus topics. They are the natural tool for Systems of Linear Equations, converting elimination into mechanical Row Reduction (Gaussian Elimination). The Determinant generalizes the 2×22\times 2 formula and governs invertibility and area/volume scaling. Multiplication of matrices is exactly composition of Linear Transformations, linking matrices to Vectors and geometry. The numerical recipe Cramer's Rule expresses solutions via determinants. At a deeper level, matrices launch the entire subject of Linear Algebra, including eigenvalues and vector spaces.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- c. 200 BCE — China. The Nine Chapters on the Mathematical Art solves systems by arranging coefficients in a grid and performing column operations — essentially Gaussian elimination two millennia early.
- 1683 — Japan & Europe. Seki Takakazu in Japan and (1693) Leibniz in Europe independently develop determinants while studying systems of equations.
- 1750 — Cramer. Gabriel Cramer publishes the determinant-based rule now bearing his name for solving linear systems.
- 1810s — Gauss. Carl Friedrich Gauss systematizes elimination while computing orbits and least-squares fits.
- 1850 — Sylvester. James Joseph Sylvester coins the term "matrix."
- 1858 — Cayley. Arthur Cayley's Memoir on the Theory of Matrices establishes matrix algebra as an independent subject and states the Cayley–Hamilton theorem.
- 1888 — Peano. Giuseppe Peano gives the axiomatic definition of a vector space, providing the abstract home for matrices.
- 1920s — Quantum mechanics. Heisenberg, Born, and Jordan formulate matrix mechanics, revealing that non-commutativity (PQ−QP≠0PQ - QP \neq 0) is physically fundamental.
- 1947 onward — Computing era. Von Neumann, Turing, and others develop numerical matrix algorithms; LU decomposition, eigenvalue methods, and the digital computer make large-scale matrix computation routine.

Subtleties & Limits

open-problem

At the precalculus level, three subtleties point toward deeper waters. (1) Numerical stability: computing inverses by the cofactor formula is hopeless for large matrices; real software uses factorizations (LU, QR), and near-singular matrices amplify rounding error — quantified by the condition number. (2) Beyond 2×22\times 2 and 3×33\times 3: the determinant for an n×nn\times n matrix has n!n! terms, so naive evaluation is computationally explosive; efficient algorithms are a serious topic. (3) The structure of singular systems: when det⁡A=0\det A = 0, a system may have no solution or infinitely many — distinguishing these requires the concept of rank, the gateway to vector spaces and dimension. Open research areas include fast matrix multiplication (the true exponent below n2.37n^{2.37} is unknown) and the numerical analysis of huge sparse matrices arising in scientific computing.

See Also

Systems of Linear Equations · Determinant · Cramer's Rule · Row Reduction (Gaussian Elimination) · Linear Transformations · Vectors · Eigenvalues and Eigenvectors · Linear Algebra