---
title: Cramer's Rule, Volume, and Linear Transformations
module: Determinants
moduleNumber: 3
lessonNumber: 3
order: 303
summary: >
  Cramer's rule writes each unknown of an invertible system as a ratio of
  determinants, and the same idea gives a closed formula for the inverse through
  the adjugate. Geometrically the absolute determinant is the area of the
  parallelogram or the volume of the parallelepiped spanned by the columns, so a
  linear map scales every region's measure by that factor.
topics: [Determinants]
sources:
  - book: Lay
    ref: "§3.3 Cramer's Rule, Volume, and Linear Transformations"
---

The determinant detects invertibility and multiplies over products. Three
consequences follow — two closed-form results and one geometric reading:

- **Cramer's rule** writes each unknown of an invertible system as a ratio of
  determinants.
- **The adjugate formula** does the same for the inverse matrix.
- **Area and volume**: the absolute determinant is the area or volume of the
  figure spanned by the columns of $A$.

The geometric reading extends furthest. It is the linear special case of the
Jacobian factor that governs change of variables in multivariable calculus.

## Cramer's rule

For a matrix $A$ and a vector $\mathbf b$, write $A_i(\mathbf b)$ for the matrix
obtained by replacing column $i$ of $A$ with $\mathbf b$, leaving every other
column alone.

$$
% caption: $A_i(\mathbf b)$ is $A$ with its $i$th column overwritten by $\mathbf
% b$; Cramer's rule reads $x_i$ off the determinant of this matrix.
\begin{tikzpicture}[scale=1.0, font=\small]
\definecolor{acc}{HTML}{4A6FA5}
% original columns
\foreach \c/\lab in {0/{$\mathbf a_1$}, 1/{. . .}, 3/{$\mathbf a_n$}}{
  \draw[black, thick] (\c*0.9,0) rectangle ++(0.6,-2.4);
  \node[font=\footnotesize, anchor=north] at (\c*0.9+0.3,-2.5) {\lab};
}
% replaced column i (highlighted)
\draw[acc, very thick, fill=acc!12] (2*0.9,0) rectangle ++(0.6,-2.4);
\node[acc, font=\footnotesize, anchor=north] at (2*0.9+0.3,-2.5) {$\mathbf b$};
\node[acc, font=\footnotesize, anchor=south] at (2*0.9+0.3,0.1) {col $i$};
\node[font=\footnotesize, anchor=west] at (4.0,-1.2) {$A_i(\mathbf b)$};
\end{tikzpicture}
$$

> **Theorem (Cramer's rule).** Let $A$ be an invertible $n \times n$ matrix.
> For any $\mathbf b$ in $\mathbb R^n$ the unique solution $\mathbf x$ of
> $A\mathbf x = \mathbf b$ has entries
> $$
> x_i = \frac{\det A_i(\mathbf b)}{\det A}, \qquad i = 1, 2, \dots, n.
> $$

The proof uses the multiplicative property. Let $I_i(\mathbf x)$ be the identity
matrix with its $i$th column replaced by $\mathbf x$. Matrix multiplication gives
$A\cdot I_i(\mathbf x) = A_i(\mathbf b)$, so by the multiplicative property,
$(\det A)\bigl(\det I_i(\mathbf x)\bigr) = \det A_i(\mathbf b)$. A cofactor
expansion of $I_i(\mathbf x)$ along its $i$th row shows $\det I_i(\mathbf x) = x_i$,
hence $(\det A)\,x_i = \det A_i(\mathbf b)$, and dividing by the nonzero
$\det A$ finishes the proof.[^lay-33]

> **Worked example.** Solve
> $$
> \begin{aligned}
> 3x_1 - 2x_2 &= 6 \\
> -5x_1 + 4x_2 &= 8
> \end{aligned}
> \qquad
> A = \begin{bmatrix} 3 & -2 \\ -5 & 4 \end{bmatrix}, \quad
> \mathbf b = \begin{bmatrix} 6 \\ 8 \end{bmatrix}.
> $$
> Here $\det A = 12 - 10 = 2$, so the system has a unique solution. Replacing
> column 1 then column 2 with $\mathbf b$,
> $$
> x_1 = \frac{\det A_1(\mathbf b)}{\det A}
>     = \frac{1}{2}\begin{vmatrix} 6 & -2 \\ 8 & 4 \end{vmatrix}
>     = \frac{24 + 16}{2} = 20,
> \qquad
> x_2 = \frac{\det A_2(\mathbf b)}{\det A}
>     = \frac{1}{2}\begin{vmatrix} 3 & 6 \\ -5 & 8 \end{vmatrix}
>     = \frac{24 + 30}{2} = 27.
> $$

Cramer's rule is efficient only for small systems — each unknown is a fresh
determinant — but its value is theoretical. Because $x_i$ is an explicit function
of the entries of $A$ and $\mathbf b$, the formula shows how a solution responds to
changes in the data, which is the question that arises when a coefficient
carries a parameter.

> **Worked example.** Determine the $s$ for which
> $$
> \begin{aligned}
> 3s\,x_1 - 2x_2 &= 4 \\
> -6x_1 + s\,x_2 &= 1
> \end{aligned}
> $$
> has a unique solution. The coefficient matrix has
> $$
> \det A = 3s^2 - 12 = 3(s+2)(s-2),
> $$
> nonzero exactly when $s \neq \pm 2$. For those $s$, Cramer's rule gives
> $$
> x_1 = \frac{4s + 2}{3(s+2)(s-2)}, \qquad
> x_2 = \frac{3s + 24}{3(s+2)(s-2)} = \frac{s + 8}{(s+2)(s-2)}.
> $$

The determinant in the denominator names the exact values where the system
degenerates. This is the pattern behind Laplace-transform analyses of linear
systems in engineering, where $s$ is the transform variable.[^lay-33]

## A formula for the inverse

Applying Cramer's rule column by column produces the inverse in closed form. The
$j$th column of $A^{-1}$ solves $A\mathbf x = \mathbf e_j$, and the $(i,j)$ entry
of $A^{-1}$ is therefore

$$
\bigl(A^{-1}\bigr)_{ij} = x_i = \frac{\det A_i(\mathbf e_j)}{\det A}.
$$

A cofactor expansion of $A_i(\mathbf e_j)$ down its $i$th column evaluates the
numerator to a single cofactor, $\det A_i(\mathbf e_j) = (-1)^{i+j}\det A_{ji} =
C_{ji}$. Note the reversed subscripts: the $(i,j)$ entry of the inverse uses the
$(j,i)$ cofactor of $A$.

> **Definition (Adjugate).** The **adjugate** of $A$, written $\operatorname{adj} A$,
> is the transpose of the matrix of cofactors:
> $$
> \operatorname{adj} A =
> \begin{bmatrix}
> C_{11} & C_{21} & \cdots & C_{n1} \\
> C_{12} & C_{22} & \cdots & C_{n2} \\
> \vdots & \vdots & & \vdots \\
> C_{1n} & C_{2n} & \cdots & C_{nn}
> \end{bmatrix}.
> $$

> **Theorem (Inverse formula).** If $A$ is an invertible $n \times n$ matrix,
> then
> $$
> A^{-1} = \frac{1}{\det A}\,\operatorname{adj} A.
> $$

> **Worked example.** Invert
> $$
> A = \begin{bmatrix} 2 & 1 & 3 \\ 1 & -1 & 1 \\ 1 & 4 & -2 \end{bmatrix}
> $$
> through the adjugate. The nine cofactors $C_{ij} = (-1)^{i+j}\det A_{ij}$ are
> $$
> \begin{array}{lll}
> C_{11} = -2, & C_{12} = 3, & C_{13} = 5, \\
> C_{21} = 14, & C_{22} = -7, & C_{23} = -7, \\
> C_{31} = 4, & C_{32} = 1, & C_{33} = -3.
> \end{array}
> $$
> The adjugate transposes this array, so $C_{12}$ lands in the $(2,1)$ position:
> $$
> \operatorname{adj} A = \begin{bmatrix} -2 & 14 & 4 \\ 3 & -7 & 1 \\ 5 & -7 & -3 \end{bmatrix}.
> $$
> Multiplying, $(\operatorname{adj} A)\,A = 14 I$, which both checks the cofactors
> and reveals $\det A = 14$. Therefore
> $$
> A^{-1} = \frac{1}{14}\begin{bmatrix} -2 & 14 & 4 \\ 3 & -7 & 1 \\ 5 & -7 & -3 \end{bmatrix}
>        = \begin{bmatrix} -1/7 & 1 & 2/7 \\ 3/14 & -1/2 & 1/14 \\ 5/14 & -1/2 & -3/14 \end{bmatrix}.
> $$

Like Cramer's rule, the adjugate formula is a theoretical instrument. It exposes
how the inverse depends on the entries of $A$ without computing anything, but for
an actual inverse the [Gauss-Jordan reduction of $[A\mid I]$](/linear-algebra/matrix-algebra/matrix-inverse-and-invertibility)
is far cheaper.[^lay-33]

## The determinant as area and volume

The absolute value of the determinant is also a geometric measure.

> **Theorem (Area and volume).** If $A$ is a $2 \times 2$ matrix, the area of
> the parallelogram determined by the columns of $A$ is $\lvert\det A\rvert$. If
> $A$ is a $3 \times 3$ matrix, the volume of the parallelepiped determined by
> the columns of $A$ is $\lvert\det A\rvert$.

$$
% caption: The columns $\mathbf a_1, \mathbf a_2$ span a parallelogram whose area
% equals $\lvert\det[\,\mathbf a_1\ \mathbf a_2\,]\rvert$.
\begin{tikzpicture}[scale=1.0, font=\small, >=stealth]
\definecolor{acc}{HTML}{4A6FA5}
\coordinate (O) at (0,0);
\coordinate (a1) at (3.2,0.6);
\coordinate (a2) at (0.9,2.4);
\coordinate (sum) at (4.1,3.0);
\fill[acc!12] (O) -- (a1) -- (sum) -- (a2) -- cycle;
\draw[thick] (O) -- (a1) -- (sum) -- (a2) -- cycle;
\draw[->, very thick] (O) -- (a1) node[below right, font=\footnotesize] {$\mathbf a_1$};
\draw[->, very thick] (O) -- (a2) node[above left, font=\footnotesize] {$\mathbf a_2$};
\node[font=\footnotesize, align=center] at (2.0,1.4) {area\\ of columns};
\draw[->, black] (-0.4,0) -- (4.7,0);
\draw[->, black] (0,-0.4) -- (0,3.4);
\end{tikzpicture}
$$

The proof begins with the easy case: a diagonal matrix $\begin{bmatrix} a & 0 \\ 0
& d \end{bmatrix}$ spans an axis-aligned rectangle of area $\lvert ad\rvert$,
matching the determinant. The general case reduces to this one. The absolute
determinant is unchanged by a column replacement or a column interchange
(the row-operation rules, read for columns), and those operations suffice to diagonalize any
$2 \times 2$ matrix. Geometrically, a column replacement $\mathbf a_2 \mapsto
\mathbf a_2 + c\,\mathbf a_1$ slides the tip of $\mathbf a_2$ along a line parallel
to $\mathbf a_1$, preserving the base and the height of the parallelogram, hence
its area.[^lay-33]

$$
% caption: A column replacement slides $\mathbf a_2$ parallel to $\mathbf a_1$;
% base and height are unchanged, so the two parallelograms have equal area.
\begin{tikzpicture}[scale=1.0, font=\small, >=stealth]
\definecolor{acc}{HTML}{4A6FA5}
\coordinate (O) at (0,0);
\coordinate (a1) at (3.4,0);
\coordinate (a2) at (0.7,2.2);
\coordinate (a2c) at (2.6,2.2);
% base line and shifted line
\draw[black, dashed] (-0.3,2.2) -- (4.4,2.2);
\node[black, font=\footnotesize, anchor=west] at (4.4,2.2) {$\mathbf a_2 + L$};
\draw[black] (-0.3,0) -- (4.4,0);
% first parallelogram
\draw[thick] (O) -- (a1) -- ($(a1)+(a2)$) -- (a2) -- cycle;
% second parallelogram (sheared)
\draw[thick, dashed] (O) -- (a1) -- ($(a1)+(a2c)$) -- (a2c) -- cycle;
\draw[->, very thick] (O) -- (a1) node[below right, font=\footnotesize] {$\mathbf a_1$};
\draw[->, very thick] (O) -- (a2) node[left, font=\footnotesize] {$\mathbf a_2$};
\draw[->, acc, very thick] (O) -- (a2c);
\node[acc, font=\footnotesize, anchor=north] at (2.9,1.85) {$\mathbf a_2 + c\mathbf a_1$};
\end{tikzpicture}
$$

The $3 \times 3$ argument is the same in one higher dimension: a diagonal matrix
spans a box of volume $\lvert abc\rvert$, and column replacements move one edge
within a plane parallel to the opposite face, changing neither the base area nor
the height of the parallelepiped.

$$
% caption: A diagonal $3\times3$ matrix spans an axis-aligned box; its volume is
% the product of the diagonal entries, equal to $\lvert\det A\rvert$.
\begin{tikzpicture}[scale=1.0, font=\small, >=stealth]
\definecolor{acc}{HTML}{4A6FA5}
% simple isometric box
\coordinate (O) at (0,0);
\coordinate (x) at (2.6,0);
\coordinate (y) at (1.1,0.7);
\coordinate (z) at (0,2.2);
\draw[acc!12, fill=acc!12] (O) -- (x) -- ($(x)+(z)$) -- (z) -- cycle;
\draw[thick] (O) -- (x) -- ($(x)+(z)$) -- (z) -- cycle;
\draw[thick] (O) -- (y) -- ($(y)+(z)$) -- (z);
\draw[thick] (x) -- ($(x)+(y)$) -- ($(x)+(y)+(z)$) -- ($(x)+(z)$);
\draw[thick] ($(y)+(z)$) -- ($(x)+(y)+(z)$);
\draw[->, very thick] (O) -- (x) node[below right, font=\footnotesize] {$a\,\mathbf e_1$};
\draw[->, very thick] (O) -- (y) node[right, font=\footnotesize] {$b\,\mathbf e_2$};
\draw[->, very thick] (O) -- (z) node[left, font=\footnotesize] {$c\,\mathbf e_3$};
\node[font=\footnotesize] at (3.9,1.4) {box volume};
\end{tikzpicture}
$$

> **Worked example.** Find the area of the parallelogram with vertices
> $(-2,-2)$, $(0,3)$, $(4,-1)$, and $(6,4)$. Translating the vertex $(-2,-2)$ to
> the origin — subtracting it from every vertex — leaves the area unchanged and
> yields a parallelogram spanned by the columns of
> $$
> A = \begin{bmatrix} 2 & 6 \\ 5 & 1 \end{bmatrix}, \qquad
> \det A = 2 - 30 = -28.
> $$
> The area is $\lvert\det A\rvert = 28$.

Translation does not affect area, so any parallelogram can be moved to the origin
and read off a determinant this way.

## Linear maps scale area and volume

If $T(\mathbf x) = A\mathbf x$ is the linear map with matrix $A$, then applying $T$
to a region multiplies its measure by exactly $\lvert\det A\rvert$.

> **Theorem (Measure scaling).** Let $T : \mathbb R^2 \to \mathbb R^2$ have
> matrix $A$. For any parallelogram $S$,
> $$
> \{\text{area of } T(S)\} = \lvert\det A\rvert \cdot \{\text{area of } S\}.
> $$
> If $T : \mathbb R^3 \to \mathbb R^3$ has matrix $A$ and $S$ is a
> parallelepiped, the same holds for volume.

The proof combines the area-and-volume result with the multiplicative property. A parallelogram at
the origin spanned by $\mathbf b_1, \mathbf b_2$ has matrix $B = [\,\mathbf b_1\
\mathbf b_2\,]$, and its image under $T$ is spanned by $A\mathbf b_1, A\mathbf b_2$,
with matrix $AB$. Then

$$
\{\text{area of } T(S)\} = \lvert\det(AB)\rvert = \lvert\det A\rvert\,\lvert\det B\rvert
= \lvert\det A\rvert \cdot \{\text{area of } S\}.
$$

An arbitrary parallelogram is a translate $\mathbf p + S$, and $T$ sends it to
$T(\mathbf p) + T(S)$; since translation preserves area, the factor
$\lvert\det A\rvert$ carries over unchanged.[^lay-33]

$$
% caption: A linear map $T$ sends the unit square to the parallelogram spanned by
% the columns of $A$, multiplying every area by $\lvert\det A\rvert$.
\begin{tikzpicture}[scale=1.0, font=\small, >=stealth]
\definecolor{acc}{HTML}{4A6FA5}
% unit square
\draw[black, thick, fill=black!6] (0,0) rectangle (1.4,1.4);
\node[font=\footnotesize] at (0.7,0.7) {$S$};
\node[font=\footnotesize, anchor=north] at (0.7,-0.1) {area $1$};
% arrow
\draw[->, very thick] (2.0,0.7) -- (3.4,0.7) node[midway, above, font=\footnotesize] {$T$};
% image parallelogram
\begin{scope}[xshift=4.0cm]
\coordinate (O) at (0,0);
\coordinate (c1) at (1.9,0.5);
\coordinate (c2) at (0.6,1.7);
\fill[acc!12] (O) -- (c1) -- ($(c1)+(c2)$) -- (c2) -- cycle;
\draw[thick] (O) -- (c1) -- ($(c1)+(c2)$) -- (c2) -- cycle;
\draw[->, very thick] (O) -- (c1) node[below right, font=\footnotesize] {$\mathbf a_1$};
\draw[->, very thick] (O) -- (c2) node[left, font=\footnotesize] {$\mathbf a_2$};
\node[font=\footnotesize, anchor=north] at (1.3,-0.35) {area of $T(S)$};
\end{scope}
\end{tikzpicture}
$$

## Beyond parallelograms

The scaling factor does not depend on straight edges. A region $R$ with finite
area can be approximated by a grid of small squares inside it; the map $T$ sends
each square to a parallelogram whose area is $\lvert\det A\rvert$ times the
square's.

$$
% caption: A region $R$ is filled by small squares; $T$ sends each to a
% parallelogram of $\lvert\det A\rvert$ times the area, so the image $T(R)$ scales
% by the same factor in the limit of a fine grid.
\begin{tikzpicture}[scale=1.0, font=\footnotesize, >=stealth]
\definecolor{acc}{HTML}{4A6FA5}
\begin{scope}
  \draw[black, thick] (0.15,0.5) -- (1.0,0.1) -- (2.0,0.4) -- (2.3,1.4) -- (1.6,2.1) -- (0.5,1.9) -- (0.05,1.1) -- cycle;
  \foreach \x in {0.4,0.8,1.2,1.6}
    \foreach \y in {0.4,0.8,1.2}
      \draw[fill=black!8] (\x,\y) rectangle ++(0.34,0.34);
  \node[anchor=north] at (1.15,-0.2) {$R$};
\end{scope}
\draw[->, very thick] (3.0,1.0) -- (4.3,1.0) node[midway, above] {$T$};
\begin{scope}[xshift=5.0cm]
  \foreach \x in {0,1,2,3}
    \foreach \y in {0,1,2}
      \draw[fill=black!8]
        (0.34*\x+0.18*\y, 0.30*\y) -- ++(0.34,0.10) -- ++(0.18,0.30) -- ++(-0.34,-0.10) -- cycle;
  \node[anchor=north] at (1.1,-0.2) {$T(R)$};
\end{scope}
\end{tikzpicture}
$$

Summing and passing to a limit shows

$$
\{\text{area of } T(R)\} = \lvert\det A\rvert \cdot \{\text{area of } R\}
$$

for any region $R$, and the analogous statement holds for volume in
$\mathbb R^3$. This is the linear special case of the change-of-variables formula
in calculus, where the local scaling factor of a nonlinear map is the absolute
value of its Jacobian determinant. The determinant a linear map applies uniformly
becomes the rate at which a smooth map expands area near each point.

## Summary

- **Cramer's rule**: for invertible $A$, the solution of $A\mathbf x =
  \mathbf b$ is $x_i = \det A_i(\mathbf b) / \det A$, where $A_i(\mathbf b)$
  replaces column $i$ of $A$ by $\mathbf b$.
- The **adjugate formula**: $A^{-1} = \frac{1}{\det A}\operatorname{adj}
  A$, where $\operatorname{adj} A$ is the transpose of the cofactor matrix. Both
  formulas are theoretical tools, not efficient algorithms.
- **Area and volume**: $\lvert\det A\rvert$ is the area of the parallelogram (or volume
  of the parallelepiped) spanned by the columns of $A$.
- **Measure scaling**: a linear map with matrix $A$ scales the area or volume of every
  region by $\lvert\det A\rvert$, a fact that extends from parallelograms to
  arbitrary regions and previews the Jacobian in multivariable calculus.

[^lay-33]: Lay, Lay & McDonald, _Linear Algebra and Its Applications_, 5th ed., §3.3 — Cramer's Rule, Volume, and Linear Transformations: Theorem 7 (Cramer's rule) and its proof via $A\cdot I_i(\mathbf x) = A_i(\mathbf b)$, Theorem 8 (inverse through the adjugate) with the reversed-subscript cofactor argument, Theorem 9 (absolute determinant as area/volume) proved by column operations, and Theorem 10 (measure scaling under a linear map) with the extension to arbitrary regions.
