Advanced maths

Matrix RREF and rank calculator

Reduce a rectangular matrix exactly and identify its rank, nullity and pivot columns.

Your numbers

One row per line or semicolon; separate entries with spaces or commas. Up to 6 rows and 6 columns. Use integers, decimals (up to 6 places) or fractions such as -2/3.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Try it, understand it

Explore the result

Count pivots and free variables in the same coefficient matrix.

Worked example comparison
ExampleOutputWhat to notice
A dependent rowMatrix rank1The default 2×3 matrix has rank one and nullity two.
Full column rankMatrix rank2A two-column identity has rank two and nullity zero.
A zero matrixMatrix rank0Rank is zero and every column variable is free.

Check your understanding

Does rank plus nullity equal the row count?

No. It equals the number of columns of the coefficient matrix.

Do row operations preserve the column span as the same set of vectors?

Not generally. Use pivot positions with original columns when constructing a column-space basis.

Behind the numbers

How this calculation works

Gauss–Jordan elimination swaps rows, scales each pivot to one and clears the other entries in its column. The remaining pivots identify the rank. Nullity counts the free variables in the homogeneous system A x = 0.

THE FORMULArank = pivot count; nullity = number of columns − rank

A worked example

For [1 2 3; 2 4 6], the RREF is [1 2 3; 0 0 0]. Rank is 1, nullity is 2 and the only pivot is column 1.

Good to know

For small matrices of exact rational numbers, up to 6 rows and 6 columns. Entries are limited to ±1,000,000; integer fraction denominators to 1,000,000. Decimal input allows up to 6 places. No expressions, scientific notation, complex numbers or uncertain measurements. Large intermediate fractions are bounded to keep the tool responsive.

Row reduction preserves the represented row relationships

Reduced row echelon form uses three elementary operations: exchange two rows, multiply a row by a nonzero value, and add a multiple of one row to another. The pivot in each leading column is normalized to one, with its other column entries cleared.

The tool keeps supported rational inputs exact rather than guessing a pivot from a tiny floating-point residual. Rank counts retained pivot positions. Nullity describes the number of free variables in the homogeneous system with all entered columns treated as coefficients.

An augmented constant column needs separate interpretation

A rectangular matrix is not automatically a system with a final constant column. If you intend to solve equations, use the linear system solver, which explicitly distinguishes coefficient columns from the constants. Otherwise the last column participates in the rank/nullity calculation just like every other matrix column.

A zero row can indicate a redundant row relationship. It does not by itself prove an inconsistent equation. In an augmented system, the contradictory pattern is zero coefficients paired with a nonzero constant. Keep that interpretation separate from reducing a general matrix.

A few questions, answered

Must the input matrix be square?

No. Rectangular matrices are supported within the stated row and column limits.

Are fractions converted to approximate decimals first?

No. Supported rational entries are retained exactly during elimination.

Does every zero row mean no solution?

No. Inconsistency depends on the coefficient/constant relationship of an augmented system.

Find your calculator

Start typing to explore the library.