Matrix Rank Calculator - 2x2 Rank and Determinant

Use this matrix rank calculator to read a 2x2 matrix A and return the rank (0, 1, or 2) and determinant in one result panel with a worked example.

Updated: June 16, 2026 • Free Tool

Matrix Rank Calculator

Top-left cell of the 2x2 input matrix A. Any real number is allowed.

Top-right cell of matrix A. Any real number is allowed.

Bottom-left cell of matrix A. Any real number is allowed.

Bottom-right cell of matrix A. Any real number is allowed.

Results

Matrix rank (0, 1, or 2)
0
Determinant det(A) = a*d - b*c 0
Rank interpretation 0

What Is a Matrix Rank Calculator?

A matrix rank calculator is a tool that takes the four entries of a 2x2 matrix A and returns the matrix rank, the determinant, and a plain-text rank label in one panel. Type the top row a and b, the bottom row c and d, and the result panel shows the rank (0, 1, or 2) together with the determinant ad - bc that decides it.

  • Linear-systems check: Decide whether a 2x2 system Ax = b has a unique solution, infinitely many solutions, or no solution at all.
  • Linear independence homework: Confirm that the two row vectors of A are linearly independent (rank 2) or linearly dependent (rank 1).
  • Invertibility sanity check: Confirm that A is invertible exactly when its rank is 2.
  • Graphics and transform analysis: Check whether a 2D rotation, scale, or shear matrix collapses a 2D direction (rank 1) or preserves the full 2D plane (rank 2).

The matrix rank is the dimension of the space spanned by the rows of the matrix, which equals the dimension of the space spanned by the columns. For a 2x2 matrix the rank is 0 if every cell is zero, 1 if the two rows point along the same line, or 2 if the two rows are linearly independent.

When the same 2x2 input cells need to be read against the Frobenius, 1, 2, infinity, and max norm alongside the rank so the user can compare how much a matrix stretches the 2D plane against how it is scaled, the matrix norm calculator returns the matching five norms in one panel from the same four input cells.

How the Matrix Rank Calculator Works

The calculator reads the four cells a, b, c, d of matrix A, computes the 2x2 determinant ad - bc, and applies a three-way decision rule. If det != 0 the rank is 2, otherwise the rank is 1 if any cell is nonzero, and 0 only when every cell is zero.

det(A) = a*d - b*c; rank(A) = 2 if det(A) != 0; rank(A) = 1 if det(A) = 0 and (a, b, c, d) is not the all-zero vector; rank(A) = 0 if a = b = c = d = 0
  • a, b: The two entries in the top row of matrix A.
  • c, d: The two entries in the bottom row of matrix A.
  • det(A) = a*d - b*c: The 2x2 determinant. The test that decides between rank 2 and rank 1.
  • rank = 2 if det(A) != 0: Full rank. The two rows are linearly independent.
  • rank = 1 if det(A) = 0 and A is not zero: Rank 1. The second row is a scalar multiple of the first.
  • rank = 0 if A is the zero matrix: Rank 0. Every cell is zero.

The only nontrivial step is the 2x2 determinant. Computing ad - bc with double precision keeps the result exact for integer and short-decimal inputs.

Worked 2x2 rank example

A = [[3, 1], [2, 4]].

det(A) = 3*4 - 1*2 = 10. The determinant is nonzero, so the rank is 2 and the two rows are linearly independent.

det(A) = 10, rank(A) = 2, label: Full rank (rank 2).

Use rank 2 to confirm that Ax = b has a unique solution for any b and that A^-1 exists.

According to Wikipedia, the rank of a matrix is the dimension of the vector space generated by its rows (or equivalently by its columns), and for a 2x2 matrix the rank is 2 if the determinant is nonzero, 1 if the determinant is zero and at least one entry is nonzero, and 0 if every entry is zero

When the rank comes back as 2 and the user wants to read the four cells of the inverse matrix A^-1 alongside the rank, the matrix inverse calculator returns the matching 2x2 inverse matrix using the same four input cells so the determinant and the inverse appear together.

Key Concepts Behind a Matrix Rank

Four short ideas cover the link between rank and linear independence, the determinant decision rule, the difference between rank and the individual cell values, and the connection between rank and the row-reduced echelon form of a 2x2 matrix.

Rank and linear independence

The rank of A is the largest number of rows (or columns) that are linearly independent. For a 2x2 matrix the maximum value is 2.

Determinant as the rank test

A nonzero determinant means the matrix is invertible and has full rank, while a zero determinant means the rank is strictly less than the size.

Rank vs. individual cell values

A single nonzero cell does not by itself decide the rank. A matrix with one nonzero cell and three zero cells can still have rank 1.

Row-reduced echelon form (RREF)

The rank is the number of pivots in the RREF of A. For a 2x2 matrix the RREF has 2 pivots (full rank), 1 pivot (rank 1), or 0 pivots (zero matrix).

These four ideas are the backbone of matrix rank in any linear algebra course. The rank is a count of pivots, the determinant is the test that decides between full rank and a lower rank.

When the same 2x2 input cells are scaled by a scalar k, the determinant scales by k^2, which keeps the nonzero test invariant, and the matrix by scalar calculator carries out that scalar scaling on a 2x2 matrix in a separate page so the rank and the scaled matrix can be compared cell by cell.

How to Use This Matrix Rank Calculator

Enter the four cells of matrix A in row order, then read the rank, the determinant, and the rank label in the result panel.

  1. 1 Type the top row of matrix A: Fill in the a and b cells with the top row of your 2x2 matrix.
  2. 2 Type the bottom row of matrix A: Fill in the c and d cells with the bottom row of matrix A.
  3. 3 Read the rank: The first result card shows the matrix rank, an integer from 0 to 2.
  4. 4 Read the determinant: The second result row shows det(A) = a*d - b*c. A nonzero determinant is the test that puts the rank at 2.
  5. 5 Read the rank label: The third result row shows the plain-text rank label.
  6. 6 Reset or change the inputs: Use Reset to restore the default A = [[3, 1], [2, 4]] example, or change any cell to recompute automatically.

For A = [[2, 4], [1, 2]], type 2 and 4 in the top row and 1 and 2 in the bottom row, and the result panel gives rank 1, determinant 0, and the label 'Rank 1 (linearly dependent rows)'. The system Ax = b has no solution or infinitely many solutions rather than a unique one.

When the same 2x2 input matrix is multiplied by a second 2x2 matrix to confirm the rank inequality rank(AB) is at most min(rank(A), rank(B)), the matrix multiplication calculator returns A * B and B * A side by side so both products and the rank of each can be compared.

Benefits of This Matrix Rank Calculator

Hand-computing the rank of a 2x2 matrix is short, but mixing up the determinant sign, the linearly dependent case, and the zero-matrix case is the most common source of errors.

  • Three outcomes in one panel: The rank, the determinant, and the plain-text rank label are returned side by side from the same four input cells.
  • Closed-form 2x2 decision rule: The rank is decided by a single nonzero check on det(A) = a*d - b*c, so the result is exact to double precision in a single pass.
  • Matches the textbook definition: The rank follows the standard linear-algebra definition: full rank 2 when det(A) is nonzero, rank 1 when det(A) is zero and A is not the zero matrix, rank 0 otherwise.
  • Works for any real entries: Cells can be 0.5, -2, 1.25, or any other real number. Full double precision is kept internally and rounding happens only at the display step.

For a problem that mixes the rank with another matrix operation on the same small matrices, the related tools on this site cover the related operations in a separate page.

When the same four input cells are used to compute the classical adjoint of A through the cofactor-transpose pattern and the user wants to see the rank-2 versus rank-1 case side by side, the adjoint matrix calculator walks through the cofactor step on the same 2x2 input.

Factors That Affect Your Matrix Rank

A handful of input choices and structural facts decide which of the three possible ranks (0, 1, or 2) the calculator returns and how that rank scales with the cell values.

Sign and magnitude of the cells

Flipping the sign of all four cells flips the sign of the determinant but leaves the rank unchanged. Multiplying every cell by a nonzero scalar k multiplies the determinant by k^2.

Proportional rows or columns

When the second row is a scalar multiple of the first row, the determinant is exactly zero, so the rank is 1. This is the most common way a 2x2 matrix becomes singular.

Zero cells versus zero matrix

A single zero cell does not force the rank below 2 unless the determinant also becomes zero. Only when every cell is zero does the rank fall to 0.

Near-zero determinant threshold

A near-zero determinant such as 1e-12 still counts as nonzero for the rank decision, so the rank stays at 2 even on a near-singular matrix.

  • The calculator is limited to 2x2 inputs. For 3x3 and larger matrices the rank decision rule still holds, but the implementation needs an n x n determinant step that this tool does not perform.
  • The 2x2 determinant can return a very small positive number rather than exactly 0 even when the matrix is rank 1, due to floating-point rounding in ad - bc.

For a 3x3 or larger matrix, the rank can be checked by hand with row reduction. The page-level links below cover the related matrix operations on the same small matrices.

According to Wolfram MathWorld, the rank of a matrix is the largest integer r such that there exists an r-by-r submatrix with a nonzero determinant, and for a 2x2 matrix this collapses to the standard decision rule: rank 2 if the determinant is nonzero, rank 1 if the determinant is zero but the matrix is not the zero matrix, and rank 0 if the entire matrix is zero

According to MIT OpenCourseWare 18.06 (Strang), the rank of a matrix is the number of pivots in its row-reduced echelon form, and for a 2x2 matrix the rank is 2 if both rows are linearly independent, 1 if one row is a scalar multiple of the other, and 0 if the matrix is the zero matrix

For a different view of how the rank-1 case still produces a nonzero vector along the row direction that can be read as a single 2D magnitude, the vector magnitude calculator returns the magnitude of a 2D or 3D vector from the same component product pattern.

matrix rank calculator showing a 2x2 input matrix A with the rank 0, 1, or 2 and the determinant outputs in the result panel
matrix rank calculator showing a 2x2 input matrix A with the rank 0, 1, or 2 and the determinant outputs in the result panel

Frequently Asked Questions

Q: What is the rank of a matrix?

A: The rank is the dimension of the vector space generated by the rows (or columns). For a 2x2 matrix it is 0 when every cell is zero, 1 when the two rows point along the same line, and 2 when the rows are linearly independent.

Q: How do you find the rank of a 2x2 matrix?

A: Compute the 2x2 determinant ad - bc. If the determinant is nonzero, the rank is 2. If it is exactly zero but at least one cell is nonzero, the rank is 1. If every cell is zero, the rank is 0.

Q: When is the rank of a matrix equal to 2?

A: The rank of a 2x2 matrix is 2 exactly when the determinant is nonzero. The two rows are linearly independent and not scalar multiples of each other.

Q: When is the rank of a matrix equal to 1?

A: The rank is 1 when the determinant is exactly zero but at least one cell is nonzero. The second row is a scalar multiple of the first row.

Q: Can the rank of a matrix be 0?

A: Yes. The rank of a 2x2 matrix is 0 if and only if the matrix is the zero matrix, with a = b = c = d = 0.

Q: What is the relationship between rank and determinant?

A: A nonzero determinant means the rank equals the size of the matrix, while a zero determinant means the rank is strictly less than the size. On a 2x2 input ad - bc decides between rank 2 and rank 1.