Skip to main content
Home
Calculating...
Home Linear Systems Null_Space

Null Space Calculator: Find Kernel of a Matrix

Find the null space (kernel) of a matrix A: all vectors x such that Ax = 0. The null space is a subspace whose dimension is the nullity = n - rank(A).

Calculator

Enter your matrix below and click "Calculate" to see the step-by-step solution.

Rows (m) =
Cols (n) =
Maximum size: 6ร—6

The null space consists of all vectors x such that Ax = 0

A Matrix A (m ร— n)

Computing null space basis...

Enter a matrix A to find its null space (all x such that Ax = 0).

The null space is a subspace whose dimension is the nullity = n - rank(A).

Learn About Null_Space

Understanding the concepts behind the calculations.


What is Null Space?

Null Space (Kernel) of a matrix A is the set of all vectors x that satisfy Ax = 0.

$$ \boxed{\text{Null}(A) = \{\mathbf{x} \in \mathbb{R}^n : A\mathbf{x} = \mathbf{0}\}} $$

In simple terms: The null space contains every input vector that gets mapped to zero by the matrix transformation.

๐Ÿ”‘ Key Insight: The null space tells you which vectors "disappear" (map to zero) when multiplied by A. The dimension of the null space is called the nullity.

Properties of Null Space

  • โœ… Always contains zero: Aยท0 = 0 (trivial solution)
  • โœ… Closed under addition: If u, v โˆˆ Null(A), then u + v โˆˆ Null(A)
  • โœ… Closed under scalar multiplication: If u โˆˆ Null(A), then cยทu โˆˆ Null(A)
  • โœ… Subspace of โ„โฟ: Null(A) is a legitimate subspace of the domain

๐Ÿ’ก Important: The null space is always a subspace of the domain (โ„โฟ), not the codomain (โ„แต).


How to Find Null Space

Step-by-Step Algorithm

  1. Set up the homogeneous system Ax = 0
  2. Convert to augmented matrix [A | 0]
  3. Compute RREF (Reduced Row Echelon Form)
  4. Identify pivot columns (basic variables) and free variables
  5. Write solution in parametric form
  6. Extract basis vectors - each free variable gives one basis vector

๐Ÿ’ก Pro Tip: The number of free variables = nullity = dimension of null space.


The Rank-Nullity Theorem

$$ \boxed{\text{rank}(A) + \text{nullity}(A) = n} $$

Where:

  • rank(A) = dimension of column space (number of pivots)
  • nullity(A) = dimension of null space (number of free variables)
  • n = number of columns

๐Ÿ”‘ This is one of the most important theorems in linear algebra! It tells us that the dimension of the column space plus the dimension of the null space always equals the number of columns.

What Rank Means

  • Number of linearly independent columns
  • Dimension of the output space
  • Number of pivots in RREF

What Nullity Means

  • Number of free variables
  • Dimension of the "invisible" inputs
  • Solutions to Ax = 0 (beyond zero)

Step-by-Step Examples

Example 1: 2ร—3 Matrix (Non-trivial Null Space)

Problem: Find null space of

$$ A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \end{bmatrix} $$

Step 1: Augmented matrix

$$ \left[\begin{array}{ccc|c} 1 & 2 & 3 & 0 \\ 2 & 4 & 6 & 0 \end{array}\right] $$

Step 2: Eliminate (Rโ‚‚ โ† Rโ‚‚ - 2Rโ‚)

$$ \left[\begin{array}{ccc|c} 1 & 2 & 3 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right] $$

Step 3: Identify variables

  • Pivot column: xโ‚ (basic variable)
  • Free variables: xโ‚‚, xโ‚ƒ

Step 4: Write equation

$$ x_1 + 2x_2 + 3x_3 = 0 \implies x_1 = -2x_2 - 3x_3 $$

Step 5: Parametric solution

$$ \mathbf{x} = \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} = \begin{pmatrix} -2x_2 - 3x_3 \\ x_2 \\ x_3 \end{pmatrix} = x_2\begin{pmatrix} -2 \\ 1 \\ 0 \end{pmatrix} + x_3\begin{pmatrix} -3 \\ 0 \\ 1 \end{pmatrix} $$

Step 6: Basis for null space

$$ \text{Basis} = \left\{ \begin{pmatrix} -2 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} -3 \\ 0 \\ 1 \end{pmatrix} \right\} $$

Solution: Nullity = 2, Rank = 1, and 1 + 2 = 3 = n โœ“

Example 2: 2ร—2 Invertible Matrix (Trivial Null Space)

Problem: Find null space of

$$ A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix} $$

Step 1: RREF of [A|0]

$$ \left[\begin{array}{cc|c} 1 & 0 & 0 \\ 0 & 1 & 0 \end{array}\right] $$

Step 2: Equations

$$ x_1 = 0,\quad x_2 = 0 $$

Solution: Only the zero vector satisfies Ax = 0. Null space = {0}. Nullity = 0, Rank = 2.

Example 3: 3ร—3 Rank-1 Matrix

Problem: Find null space of

$$ A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix} $$

RREF form:

$$ \left[\begin{array}{ccc|c} 1 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right] $$

Equation: xโ‚ + xโ‚‚ + xโ‚ƒ = 0

Basis for null space:

$$ \left\{ \begin{pmatrix} -1 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} -1 \\ 0 \\ 1 \end{pmatrix} \right\} $$

Solution: Nullity = 2 (a plane through the origin), Rank = 1. 1 + 2 = 3 โœ“


Special Cases

โœจ Trivial Null Space (Nullity = 0)

Only the zero vector satisfies Ax = 0.

Occurs when:

  • A has full column rank
  • Columns are linearly independent
  • A is injective (one-to-one)
  • Square invertible matrices
$$ \text{Null}(A) = \{\mathbf{0}\} $$

๐Ÿ”ฅ Full Null Space (Nullity = n)

Every vector satisfies Ax = 0.

Occurs only when:

  • A is the zero matrix
  • All entries of A are zero
  • Rank(A) = 0
$$ \text{Null}(A) = \mathbb{R}^n $$

๐Ÿ“Œ Most common case: Non-trivial null space with 0 < nullity < n. This happens when A has linearly dependent columns but is not the zero matrix.


Geometric Interpretation

The null space tells you the dimension of inputs that get "crushed" to zero:

Nullity Geometry Example
0 Point (origin only) Full rank square matrix (invertible)
1 Line through origin 3ร—3 rank-2 matrix
2 Plane through origin 3ร—3 rank-1 matrix
k k-dimensional subspace Rank-deficient matrix

๐ŸŽจ Visual Intuition: Think of the matrix as a function that maps input vectors to outputs. The null space is the set of all inputs that land at the origin. More dimensions in null space = more information lost!


Real-World Applications

๐Ÿ”ง Engineering

  • Structural analysis: Forces that produce zero net effect
  • Control theory: Unobservable states (kernel of observability matrix)
  • Vibration analysis: Rigid body modes (zero frequency)

๐ŸŽฎ Computer Graphics

  • Finding transformations that preserve certain properties
  • Detecting degenerate projections
  • Computer vision (essential matrices)

๐Ÿค– Machine Learning

  • Dimensionality reduction: Features with no variance
  • PCA: Null space contains directions with zero variance
  • Autoencoders: Understanding information loss

โš›๏ธ Mathematics

  • Differential equations: Homogeneous solutions
  • Quantum mechanics: Zero-energy states
  • Algebraic topology: Boundary operators

๐Ÿ’ก Key Application: The null space helps identify linear dependencies in data. In machine learning, features in the null space of the covariance matrix are redundant!


Practice Problems

Beginner

  1. Find null space of A = [3, -1; 6, -2]

  2. What's the nullity of a 2ร—2 invertible matrix?

Intermediate

  1. Find basis for null space of

    $$ A = \begin{bmatrix} 1 & 2 & -1 \\ 2 & 4 & -2 \\ -1 & -2 & 1 \end{bmatrix} $$
  2. If A is 4ร—6 with rank 3, what is the nullity?

Advanced

  1. Prove that null space is a subspace of โ„โฟ.

Click to reveal solutions

1. span{[1, 3]แต€} (nullity = 1)

2. Nullity = 0 (only zero vector)

3. Basis: {[-2, 1, 0]แต€, [1, 0, 1]แต€} (nullity = 2)

4. Nullity = 6 - 3 = 3

5. Check three subspace properties: zero vector, closure under addition, closure under scalar multiplication.


Summary

Key Takeaways

  • Null space: Set of all vectors x where Ax = 0
  • Nullity: Dimension of null space = number of free variables
  • Rank-Nullity Theorem: rank(A) + nullity(A) = n (columns)
  • Finding null space: Solve Ax = 0 โ†’ RREF โ†’ parametric form โ†’ basis
  • Trivial null space: Only zero vector โ†’ nullity = 0 โ†’ full column rank
  • Non-trivial null space: Infinitely many solutions โ†’ linear dependence

๐Ÿš€ Ready to explore? Use the calculator above to find null spaces instantly. Try a rank-deficient matrix and watch the basis vectors appear!