Null Space Calculator

Compute the null space of any square matrix A (2x2 to 5x5). Find basis vectors for the kernel of Ax = 0, rank, nullity, and reduced row echelon form. Visualize the null space as a line or plane in R² / R³.

or (2–5)
Privacy-first: All calculations run locally using double-precision arithmetic. No data leaves your device. Accuracy guarantee: Tested against singular, full‑rank, and random matrices with tolerance 1e-8.

What is the Null Space (Kernel) of a Matrix?

In linear algebra, the null space (or kernel) of a matrix A (size m × n) is the set of all vectors x ∈ ℝⁿ such that Ax = 0. It forms a subspace of ℝⁿ and reveals fundamental properties of the linear transformation associated with A. The dimension of the null space is called the nullity. Together with the rank (dimension of column space), the rank–nullity theorem states: rank(A) + nullity(A) = n.

Kernel: ker(A) = { x ∈ ℝⁿ | A x = 0 }

Computing the null space is essential in solving homogeneous linear systems, understanding eigenvectors for eigenvalue 0, analyzing structural mechanics, and dimensionality reduction (PCA, SVD). This calculator implements the Gauss‑Jordan elimination method to obtain the Reduced Row Echelon Form (RREF) and then extracts basis vectors by solving for pivot variables in terms of free variables.

Step‑by‑Step Calculation (RREF Method)

Our algorithm reduces the matrix to Reduced Row Echelon Form (RREF) via Gaussian elimination with partial pivoting. The steps are:

  • Step 1: Transform A → RREF using elementary row operations (scale rows, swap rows, eliminate above/below pivots).
  • Step 2: Identify pivot columns (leading 1’s) and free columns (non‑pivot).
  • Step 3: Write parametric solution of Ax = 0: each free variable becomes a parameter.
  • Step 4: Extract basis vectors: for each free variable, set it to 1 and all other free variables to 0, then back‑substitute into pivot equations.

Mathematical derivation: If RREF has pivot columns p₁,…,pᵣ and free columns f₁,…,fₖ, then for each free variable x_fⱼ we set it to 1 and all other free variables to 0; the pivot variables are computed as x_{pᵢ} = – Σ a_{i,fⱼ} · x_{fⱼ}. The resulting vectors form a basis for the null space.

Applications in Science & Engineering

Robotics & Inverse Kinematics: Null space motions allow redundant manipulators to move without changing end‑effector position.
Network Analysis: Kirchhoff’s current law leads to null space of incidence matrix (loop currents).
Statistics (PCA): Null space of covariance matrix reveals directions of zero variance.
Structural Engineering: Null space of equilibrium matrix identifies mechanisms / infinitesimal modes.
Case Study: Computer Vision – Fundamental Matrix

In epipolar geometry, the fundamental matrix F (3×3) satisfies x'ᵀ F x = 0 for corresponding points. Its null space (right nullspace) gives the epipole. Computing the null space accurately is crucial for 3D reconstruction – our calculator yields rigorous basis vectors, validated against synthetic and real datasets.

Expert Notes & Historical Context

The concept of null space was formalized by James Joseph Sylvester and Arthur Cayley in the 19th century. The Rank–Nullity Theorem was refined by Ferdinand Georg Frobenius. Modern linear algebra textbooks (Strang, Lay, Axler) emphasize the centrality of the four fundamental subspaces. This calculator implements the numerically stable algorithm described in “Linear Algebra and Its Applications” by Gilbert Strang (5th ed., 2016), Chapter 3.

Reviewed for mathematical rigor and pedagogical clarity. The implementation follows stable numerical routines with tolerance 1e-8, tested against random matrices, singular cases (zero matrix, rank‑deficient), and known textbook examples. 

Frequently Asked Questions

Only if the matrix is singular (determinant zero / rank less than n). Full rank square matrices have null space = {0} (only trivial solution). Example: identity matrix has nullity 0.

Visualization deepens intuition: for 2x2, null space is a line through origin; for 3x3 it's a line or plane (or point). The interactive graph maps abstract algebra to geometry, helping students grasp the concept of subspaces.

We use double-precision arithmetic and a tolerance 1e-8 for pivot decisions. Results are accurate for almost all practical matrices; ill‑conditioned cases display a warning.

Currently we support square matrices up to 5x5. For rectangular matrices, the same linear algebra principles apply; we plan to extend in a future update. However, the rank–nullity theorem generalizes to m×n matrices.
Authoritative References: Wolfram MathWorld (Null Space); Strang, G. (2016). "Linear Algebra and Its Applications", 5th ed., Wellesley‑Cambridge Press; Lay, D. (2015). "Linear Algebra and Its Applications", 5th ed., Pearson; MIT OpenCourseWare 18.06 (Lecture 7: Null space, Column space).
Last reviewed: Jun 2026 by the GetZenQuery tech team. Tool complies with WCAG 2.1 accessibility guidelines.