Kernel Calculator
Find the kernel (null space) of a matrix: every vector x with Ax = 0. Set the matrix size, enter the entries, and the tool row-reduces to RREF, identifies pivot and free columns, and returns the rank, the nullity, and a basis for the kernel, with each basis vector verified by multiplying it back through the matrix. Row reduction also powers matrix inversion: our 2×2 inverse matrix calculator runs the same Gauss-Jordan steps on a smaller example. A closely related question is which vectors a matrix stretches rather than kills: our eigenvector calculator explores that side of the theory.
Enter each matrix entry ?
Exact for the entries you type; floating-point display is rounded to 4 decimals. Very large or ill-conditioned matrices can show tiny rounding artifacts near zero.
Quick Answer
The kernel (null space) of a matrix A is every vector x with Ax = 0. The tool row-reduces to RREF, identifies pivot and free columns, and returns the rank, the nullity, and a kernel basis, verifying each basis vector by multiplying it back through the matrix. For example, A = [[1, 2], [2, 4]] reduces to RREF [[1, 2], [0, 0]]: rank 1, nullity 1, kernel basis [-2, 1], verified since A times [-2, 1] = [0, 0].
- Quick Answer
- Worked example, checked against this exact tool
- What the kernel of a matrix is
- How the tool finds it
- The rank-nullity theorem
- When the kernel is guaranteed nontrivial
- The kernel you already know: eigenspaces
- A second example: two free variables
- Where null spaces show up
- What competing calculators miss
- Frequently asked questions
- Add This Calculator to Your Website
- References
Worked example, checked against this exact tool
Take A = [[1, 2], [2, 4]] (press Load example to fill it). Gauss-Jordan elimination gives RREF [[1, 2], [0, 0]]: one pivot column, one free column, so rank 1 and nullity 1. Setting the free variable x₂ = 1 gives x₁ = −2, so the kernel basis is v₁ = [−2, 1]. The tool verifies it: A·v₁ = [1(−2) + 2(1), 2(−2) + 4(1)] = [0, 0]. Every kernel vector is a scalar multiple of [−2, 1].
What the kernel of a matrix is
The kernel (null space) of an m×n matrix A is the set of all vectors x in ℝⁿ with Ax = 0. It is always a subspace: it contains the zero vector, and sums and scalar multiples of kernel vectors stay in the kernel. Its dimension is called the nullity. If the only solution is x = 0, the kernel is trivial and the columns of A are linearly independent. The same question can be framed as a homogeneous system of equations, where the kernel is the full solution set, as the linear-systems calculator shows.
How the tool finds it
The tool runs Gauss-Jordan elimination to reduced row echelon form, then reads off pivot columns (each has a leading 1) and free columns. With rank r and n columns, the rank-nullity theorem says nullity = n − r. For each free column it builds one basis vector: set that free variable to 1, the other free variables to 0, and read the pivot variables off the RREF row as the negative of the free-column entries.
The rank-nullity theorem
For any m×n matrix, rank(A) + nullity(A) = n, as shown in the rank theorem. Every column is either a pivot column (contributing to the rank) or a free column (contributing one dimension to the kernel). The tool prints this check with every result, so you can confirm the arithmetic: for the example above, 1 + 1 = 2 columns.
When the kernel is guaranteed nontrivial
Any matrix with more columns than rows (m < n) must have a nontrivial kernel: there are more unknowns than equations, so free variables always exist and nullity is at least n − m, the point of Strang's fundamental theorem of linear algebra. A zero matrix has the whole space as its kernel (nullity = n); an identity matrix has the trivial kernel.
The kernel you already know: eigenspaces
Every eigenspace is a kernel in disguise. The eigenspace for an eigenvalue λ is the set of vectors with Ax = λx, which rearranges to (A − λI)x = 0: exactly the kernel of the matrix (A − λI). The kernel of A itself is the eigenspace for λ = 0. So when this tool finds a kernel, it is running the same row-reduction machinery an eigenvector tool uses for each eigenvalue, with λ set to zero, as taught in the MIT OpenCourseWare linear algebra course. Finding a basis for such an eigenspace is the same computation as finding a kernel basis, which is what the basis-for-eigenspace calculator does for a chosen eigenvalue.
A second example: two free variables
With more than one free column, each free variable contributes one basis vector. Take A = [[1, 0, 2, 0], [0, 1, 0, 3]], already in reduced row echelon form. Columns 1 and 2 are pivot columns; columns 3 and 4 are free. Rank 2, four columns, so nullity = 4 − 2 = 2: the kernel is a plane, not a line.
Set the free variables one at a time. With x3 = 1, x4 = 0, the pivot rows give x1 = −2 and x2 = 0, so v1 = [−2, 0, 1, 0]. With x3 = 0, x4 = 1, the pivot rows give x1 = 0 and x2 = −3, so v2 = [0, −3, 0, 1]. Multiply back: A·v1 = [1(−2) + 2(1), 0] = [0, 0], and A·v2 = [0, 1(−3) + 3(1)] = [0, 0]. Every kernel vector is a combination a·v1 + b·v2. Notice the pattern: each basis vector carries a 1 in its own free slot, a 0 in the other free slots, and the negated RREF entries in the pivot slots. That is the whole construction, and the tool above runs it for any size.
Where null spaces show up
Null spaces appear wherever a system has more unknowns than independent constraints. In structural engineering, the kernel of a truss's equilibrium matrix holds its mechanisms: a nontrivial kernel means the structure can move, which is exactly what the engineer checks for. In differential equations, the solution set of a homogeneous linear equation is the kernel of the differential operator: for y″ + y = 0 it is the plane spanned by sin and cos. In data fitting, the null space of a measurement matrix holds the directions the data cannot see, which is why underdetermined problems need extra criteria, like regularization, to pick one solution. The row-reduction on this page is the same operation in every case; only the meaning of the matrix changes.
What competing calculators miss
The best-known null-space tools show the basis but hide the RREF they used, skip the rank, or never prove the answer. This page shows the RREF, the rank, and the nullity together, and multiplies every basis vector back through your matrix so you see A·v = 0 with your own entries, plus a one-click example matrix.
Frequently asked questions
The set of all vectors x such that Ax = 0. It is a subspace of ℝⁿ (n = number of columns), and its dimension is the nullity of A.
Row-reduce A to RREF, identify pivot and free columns, then for each free column set that free variable to 1 (others 0) and solve for the pivot variables. Those vectors form a basis.
The dimension of the kernel: the number of free variables, equivalently the number of basis vectors. Nullity = columns − rank.
Only the zero vector satisfies Ax = 0. That happens exactly when every column is a pivot column, i.e. the columns are linearly independent.
Yes. Every matrix has a kernel. If it has more columns than rows, the kernel is always nontrivial (dimension at least columns − rows).
rank(A) + nullity(A) = n for any m×n matrix A. The tool verifies this identity on every calculation.
It is a built-in correctness check: a true kernel vector must multiply back to the zero vector. If rounding ever crept in, you would see it there.
It describes all solutions of homogeneous systems, tests whether a transformation is one-to-one, and in coding theory the valid codewords are the null space of the parity-check matrix.
No. Elementary row operations preserve the solution set of Ax = 0, so the RREF has exactly the same kernel as the original matrix.
Enter them directly; the tool accepts any numeric entries and displays results rounded to 4 decimals.
Yes. Kernel is the general term for any linear map; null space is the matrix-specific synonym. This tool uses both because students search for both.
The eigenspace for the eigenvalue λ: all vectors x with Ax = λx. The kernel of A itself is the eigenspace for λ = 0, which is why kernel-finding and eigenvector-finding use the same row-reduction machinery.
Yes. For the zero matrix, every vector satisfies Ax = 0, so the kernel is all of Rⁿ and the nullity equals n. At the other extreme, the identity matrix has the trivial kernel.
Add This Calculator to Your Website
Put this kernel calculator on your own website or blog. Copy the code below and paste it into your page HTML. The embedded calculator updates automatically whenever we improve it.
Powered by Calculator Zilo - the embedded calculator links back to this page.
References
MIT OpenCourseWare. 18.06 Linear Algebra, Gilbert Strang. MIT OCW: Linear Algebra (Accessed Oct 16, 2026).
LibreTexts Mathematics. Kernel and Image of a Linear Transformation. LibreTexts: kernel and image (Accessed Oct 16, 2026).
Khan Academy. Linear algebra. Khan Academy: linear algebra (Accessed Oct 16, 2026).
Margalit and Rabinoff. “Interactive Linear Algebra: The Rank Theorem.” Interactive Linear Algebra: rank theorem (Accessed Oct 16, 2026).
Gilbert Strang. “The Fundamental Theorem of Linear Algebra.” American Mathematical Monthly 100(9) (1993). Strang: The Fundamental Theorem of Linear Algebra (PDF) (Accessed Oct 16, 2026).
