Null Space Calculator
Find a basis for the kernel of a real matrix, its rank and nullity, pivot and free columns, and an optional reduced row echelon form.
Matrix inputs
Live results
The kernel has dimension 2, so two independent basis vectors describe every solution of A·x = 0.
2
1, 3
2, 4
A·v = 0
x = t₁(2, 1, 0, 0) + t₂(-7/3, 0, 1/3, 1)
Nullity 2; rank 2; two basis vectors.
Basis vectors and verification
| Basis vector | Coordinates | Decimal form | Verification |
|---|---|---|---|
| v₁ | (2, 1, 0, 0) | (2, 1, 0, 0) | A·v₁ = 0 |
| v₂ | (-7/3, 0, 1/3, 1) | (-2.333333, 0, 0.333333, 1) | A·v₂ = 0 |
Each listed vector is linearly independent and satisfies the homogeneous system exactly under the calculator's rational arithmetic.
Reduced row echelon form
| Row | Column 1 | Column 2 | Column 3 | Column 4 |
|---|---|---|---|---|
| 1 | 1 | -2 | 0 | 7/3 |
| 2 | 0 | 0 | 1 | -1/3 |
Leading 1s identify pivot columns. Columns without pivots correspond to free variables and generate the basis vectors shown above.
How to use the null space calculator
What this calculator does
This calculator solves the homogeneous matrix equation A·x = 0 for a real matrix with one to four rows and one to four columns. It uses exact rational Gauss – Jordan elimination whenever the entered values are integers, terminating decimals, or fractions, then reports a basis for the null space, the matrix rank, the nullity, pivot columns, free columns, and – when selected – the reduced row echelon form. The result describes every vector that the matrix maps to zero. It does not determine eigenvectors, solve a nonhomogeneous system A·x = b, or prove facts about symbolic parameters.
When to use it
Use it to check linear-algebra homework, identify dependent directions in a linear transformation, verify whether a matrix has only the trivial kernel, or inspect the free variables behind an underdetermined homogeneous system. The underlying definition is summarized in Wolfram MathWorld's null-space reference.
How to calculate
- The calculator opens with a complete 2 × 4 demonstration matrix and an immediately available example XLSX export. Review the live result before replacing the sample.
- Choose Number of rows and Number of columns. The visible matrix-entry grid changes to match those dimensions.
- Enter every visible Matrix entry Ar,c. Use integers, period-based decimals, or fractions such as 1/3. A blank cell, decimal comma, scientific notation, zero denominator, or unsupported symbol is rejected.
- Keep Show reduced matrix selected to inspect the row-reduced matrix, or clear it when you only need the basis and summary metrics.
- Read Nullity first, then use Rank, Pivot columns, Free columns, the Null-space basis, and the verification table to interpret the solution.
- Select Download Excel to export the current validated inputs and results as a real XLSX workbook. Reset clears the demonstration data, returns the matrix to a blank 2 × 2 state, hides calculated content, and disables export until all visible entries are valid again.
Input guide
Number of rows is a required whole-number selector from 1 to 4; the startup value is 2. Increasing rows adds equations and can increase rank, although redundant rows do not. Number of columns is a required whole-number selector from 1 to 4; the startup value is 4. Columns define the number of unknown coordinates, and additional nonpivot columns increase nullity. A common mistake is reversing rows and columns when transcribing a matrix.
Matrix entries Ar,c are required real values. The startup entries are (2, -4, 8, 2) and (6, -12, 3, 13). Enter 0 explicitly when a matrix element is zero; do not leave it blank. Fractions are interpreted exactly, so 1/3 is preferable to a rounded 0.333 when exact structure matters. Each entry can change the pivot pattern, rank, nullity, and basis. Show reduced matrix is an optional checkbox; it changes only whether the reduced matrix is displayed and exported, not the mathematical result.
Output guide
The Matrix summary pill repeats the active row-by-column size, while the Basis vectors pill repeats the number of independent vectors in the reported basis. Nullity is the dimension of the kernel and equals the number of basis vectors. Zero means the only solution is the zero vector. Rank is the number of pivot columns. The exact identity rank + nullity = number of columns is the rank – nullity theorem. Pivot columns mark constrained variables; Free columns mark parameters that generate the kernel. Null-space basis writes every solution as a linear combination of basis vectors. The Basis vectors and verification table gives exact coordinates, decimal approximations, and the identity A·v = 0. The Reduced row echelon form table shows the elimination result used to locate pivots; it is an exact transformation of the row equations, not a separate estimate.
Worked example
For the startup matrix A = ((2, -4, 8, 2), (6, -12, 3, 13)), row reduction gives rows (1, -2, 0, 7/3) and (0, 0, 1, -1/3). The pivot columns are 1 and 3, so rank = 2. Columns 2 and 4 are free, so nullity = 4 - 2 = 2. Setting the second free variable to 1 and the fourth to 0 gives v₁ = (2, 1, 0, 0). Setting the second to 0 and the fourth to 1 gives v₂ = (-7/3, 0, 1/3, 1). Therefore x = t₁v₁ + t₂v₂, exactly matching the first-open display and workbook.
How the calculation works
The calculator converts the matrix to reduced row echelon form with elementary row operations: swapping rows, multiplying a row by a nonzero constant, and adding a multiple of one row to another. Those operations preserve the solution set of A·x = 0. Each leading 1 identifies a pivot variable. Every nonpivot column becomes a free variable, and assigning one free variable at a time to 1 constructs a basis vector. LibreTexts provides a detailed explanation of null spaces and parametric vector form.
Null(A) = {x ∈ Rⁿ : A·x = 0} and nullity(A) = n - rank(A)
Numerically close decimal values can represent a matrix that is theoretically singular or nonsingular depending on measurement precision. This calculator treats the values you enter as exact terminating decimals or fractions; it does not apply a floating-point tolerance to guess intended dependencies.