Mathwords logoMathwords

Nullity — Definition, Formula & Examples

Nullity is the number of free variables in the solution to Ax=0A\mathbf{x} = \mathbf{0}, or equivalently, the dimension of the null space of a matrix.

For an m×nm \times n matrix AA, the nullity of AA is defined as nullity(A)=dim(ker(A))\text{nullity}(A) = \dim(\ker(A)), where ker(A)={xRn:Ax=0}\ker(A) = \{\mathbf{x} \in \mathbb{R}^n : A\mathbf{x} = \mathbf{0}\}. By the rank–nullity theorem, rank(A)+nullity(A)=n\text{rank}(A) + \text{nullity}(A) = n.

Key Formula

nullity(A)=nrank(A)\text{nullity}(A) = n - \text{rank}(A)
Where:
  • AA = An m × n matrix
  • nn = The number of columns of A
  • rank(A)\text{rank}(A) = The number of pivot columns in the row echelon form of A

How It Works

To find the nullity of a matrix, row-reduce it to echelon form and count the number of columns that do not contain a pivot. Each non-pivot column corresponds to a free variable, and the total count equals the nullity. Alternatively, if you already know the rank, subtract it from the number of columns: nullity=nrank\text{nullity} = n - \text{rank}. A nullity of zero means the only solution to Ax=0A\mathbf{x} = \mathbf{0} is the trivial solution x=0\mathbf{x} = \mathbf{0}.

Worked Example

Problem: Find the nullity of the matrix A = [[1, 2, 3], [2, 4, 6]].
Step 1: Row-reduce A. Subtract 2 times row 1 from row 2.
[123246]R22R1[123000]\begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \end{bmatrix} \xrightarrow{R_2 - 2R_1} \begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \end{bmatrix}
Step 2: Count the pivots. There is 1 pivot (in column 1), so rank(A) = 1.
rank(A)=1\text{rank}(A) = 1
Step 3: Apply the rank–nullity theorem. The matrix has n = 3 columns.
nullity(A)=31=2\text{nullity}(A) = 3 - 1 = 2
Answer: The nullity of A is 2, meaning the null space is a 2-dimensional subspace of R³.

Why It Matters

Nullity tells you how many degrees of freedom exist in the solution set of a homogeneous system. In applications like computer graphics and data science, a nonzero nullity signals redundancy among the columns, which affects everything from solving systems of equations to performing dimensionality reduction.

Common Mistakes

Mistake: Confusing nullity with rank, or subtracting rank from the number of rows instead of columns.
Correction: The rank–nullity theorem uses the number of columns, not rows: nullity = n − rank(A), where n is the column count.