Matrix Rank Calculator
Free Matrix rank Calculator for fractions. Enter values to get step-by-step solutions with formulas and graphs. Includes formulas and worked examples.
Formula
rank(A) = number of pivot positions in row echelon form
The rank is computed by transforming the matrix to row echelon form using Gaussian elimination and counting the number of non-zero rows (pivot rows). The nullity equals the number of columns minus the rank, per the rank-nullity theorem.
Worked Examples
Example 1: Rank of a 3x3 Singular Matrix
Problem: Find the rank of A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]].
Solution: Row reduce:\nR2 = R2 - 4*R1: [[1,2,3],[0,-3,-6],[7,8,9]]\nR3 = R3 - 7*R1: [[1,2,3],[0,-3,-6],[0,-6,-12]]\nR3 = R3 - 2*R2: [[1,2,3],[0,-3,-6],[0,0,0]]\n2 nonzero rows = rank 2.\nRow 3 = Row 1 + Row 2, confirming linear dependence.
Result: Rank: 2 | Nullity: 1 | Not full rank | 2 pivot columns
Example 2: Rank of a Full-Rank 2x3 Matrix
Problem: Find the rank of A = [[1, 0, 2], [0, 1, 3]].
Solution: The matrix is already in row echelon form with 2 pivots (columns 1 and 2).\nBoth rows are linearly independent.\nRank = 2 = min(2, 3), so the matrix has full rank.\nNullity = 3 - 2 = 1 (one free variable, column 3).
Result: Rank: 2 (full rank) | Nullity: 1 | Full row rank | 2 pivot columns
Frequently Asked Questions
What is the rank of a matrix and what does it represent?
The rank of a matrix is the maximum number of linearly independent rows (or equivalently, linearly independent columns). It represents the dimension of the column space (also called the range or image) of the matrix. Intuitively, the rank tells you the true dimensionality of the information contained in the matrix. A 3x3 matrix with rank 2 means that while it appears three-dimensional, its columns actually span only a two-dimensional subspace. The rank determines how many independent equations exist in a linear system, how much the associated transformation compresses space, and whether the system has a unique solution, infinitely many solutions, or no solution.
How is the rank computed using row echelon form?
The rank is computed by transforming the matrix into row echelon form (REF) using Gaussian elimination and then counting the number of non-zero rows. Gaussian elimination applies three row operations that do not change the rank: swapping two rows, multiplying a row by a nonzero scalar, and adding a scalar multiple of one row to another. After elimination, the matrix has a staircase pattern where each leading entry (pivot) is to the right of the one above it. The number of pivots equals the rank. This method is both theoretically elegant and computationally efficient, requiring approximately n cubed divided by 3 operations for an n x n matrix, making it the standard algorithm in numerical linear algebra.
What is the rank-nullity theorem?
The rank-nullity theorem states that for an m x n matrix A, the rank of A plus the nullity of A equals n (the number of columns). The nullity is the dimension of the null space (kernel), which is the set of all vectors x such that Ax = 0. This theorem provides a fundamental constraint: every column either contributes to the rank (as part of a pivot column) or to the nullity (as a free variable). If a 5x3 matrix has rank 2, its nullity is 1, meaning the null space is one-dimensional. This theorem is crucial for understanding solution spaces of linear systems, where the nullity determines the number of free parameters in the general solution.
What does it mean for a matrix to have full rank?
A matrix has full rank when its rank equals the smaller of its row and column counts, meaning rank equals min(m, n) for an m x n matrix. For square matrices, full rank means rank equals n, which is equivalent to the matrix being invertible (having a nonzero determinant). A matrix with full row rank (rank = m) means all rows are linearly independent, and the system Ax = b has at least one solution for every b. A matrix with full column rank (rank = n) means all columns are independent, and the system Ax = b has at most one solution for any b. Full rank is desirable in statistical regression because it ensures unique parameter estimates.
How does rank relate to the solvability of linear systems?
The rank determines whether a system Ax = b has solutions and how many. By the Rouche-Capelli theorem, the system is consistent (has at least one solution) if and only if the rank of A equals the rank of the augmented matrix [A|b]. If consistent with rank r and n unknowns, the solution space has dimension n - r. When n - r = 0, there is a unique solution. When n - r > 0, there are infinitely many solutions parameterized by n - r free variables. When the augmented matrix has higher rank than A, the system is inconsistent with no solutions. This analysis provides a complete classification of linear system behavior based on a single computable quantity.
What is the relationship between rank and determinant?
For square matrices, the determinant is nonzero if and only if the matrix has full rank. A rank-deficient square matrix (rank less than n) always has determinant zero, making it singular. However, the determinant provides more information than just full rank versus not: its value indicates the scaling factor of the transformation and its sign indicates orientation. For non-square matrices, the determinant is not defined, but rank still makes sense. The rank can be related to the largest non-vanishing minor determinant: the rank of a matrix equals the size of the largest square submatrix with a nonzero determinant, providing an alternative characterization of rank.