Matrix Rank Calculator
The rank of a matrix is one of the most informative numbers you can attach to it, capturing how much truly independent information it holds, and this calculator finds it for a two by two or three by three matrix by doing the row reduction for you. Choose the size, type the entries into the grid, and it returns the rank along with what that rank means for the matrix, updating as you type. Rank is defined as the number of linearly independent rows, which, in one of the neat results of linear algebra, is always the same as the number of independent columns. The practical way to find it is to use elementary row operations to sweep the matrix into row echelon form, a staircase shape, and then count the rows that are not entirely zero, because any row that was just a combination of the others collapses to zeros during the process. That single number answers a surprising range of questions. A square matrix has full rank exactly when it is invertible and its determinant is non-zero, so rank is a quick check for singularity. For a system of equations, the rank tells you whether there is a unique solution, no solution, or infinitely many, by comparing the rank of the coefficient matrix with that of the augmented matrix. And in data and engineering, rank reveals hidden dependencies, redundant measurements and the true dimensionality of a problem. That makes the tool genuinely useful for linear algebra students learning row reduction, independence and rank and checking homework, and for anyone needing to know whether a matrix is full rank or its rows are dependent. The method and a worked example are explained clearly below.
How it works
The calculator applies Gaussian elimination, using row swaps and adding multiples of one row to another, to reach row echelon form. It then counts the non-zero rows. A tiny tolerance treats values very close to zero as zero, to handle rounding. The rank is at most the smaller of the number of rows and columns.
Worked example
For the matrix with rows 1, 2, 3 then 4, 5, 6 then 7, 8, 9: the third row equals two times the second minus the first, so the rows are dependent. Row reduction leaves two non-zero rows, so the rank is 2, not the full 3, and the matrix is singular.