Skip to content
Math

Matrix Calculator

Calculate the determinant, inverse, transpose, trace, adjugate, and rank of a 2x2 or 3x3 matrix. Enter the matrix entries, choose the size and operation, and the calculator shows the result alongside full step-by-step working so you can follow every calculation.

Your details

Select whether the matrix is 2 by 2 or 3 by 3.
Choose the matrix operation to compute.
Top-left entry of the matrix.
Top-right entry of the matrix.
Bottom-left entry of the matrix.
Bottom-right entry of the matrix.
DeterminantInvertible
10

The scalar det(A). Only defined for square matrices.

Invertible?Yes
Inverse matrix A⁻¹[0.6, -0.7; -0.2, 0.4]
Transpose Aᵀ[4, 2; 7, 6]
Trace10
Adjugate (adj A)[6, -7; -2, 4]
Rank2
Determinant10
Trace10
Rank2

The determinant is 10, so this 2x2 matrix is invertible.

  • |det(A)| = 10 is the factor by which the matrix scales area.
  • A negative determinant means the transformation also flips orientation.
  • The inverse is computed by dividing the adjugate matrix by the determinant.

Next stepUse the inverse to solve the linear system A x = b as x = A inverse times b.

Formula

2x2: det(A)=adbc,A1=1adbc[dbca]3x3: det(A)=a(eifh)b(difg)+c(dheg),A1=1detAadj(A)\text{2x2: }\det(A)=ad-bc,\quad A^{-1}=\tfrac{1}{ad-bc}\begin{bmatrix}d&-b\\-c&a\end{bmatrix}\\\text{3x3: }\det(A)=a(ei-fh)-b(di-fg)+c(dh-eg),\quad A^{-1}=\tfrac{1}{\det A}\operatorname{adj}(A)

Worked example

For A = [4, 7; 2, 6]: det = (4 x 6) - (7 x 2) = 24 - 14 = 10. Inverse = (1/10) x [6, -7; -2, 4] = [0.6, -0.7; -0.2, 0.4]. Trace = 4 + 6 = 10. Rank = 2 (full rank). Transpose = [4, 2; 7, 6].

How the determinant works (2x2 and 3x3)

For a 2x2 matrix with entries a, b on the top row and c, d on the bottom row, the determinant is ad minus bc. Multiply the diagonal products in opposite directions and subtract. For a 3x3 matrix, the standard method is cofactor expansion along the first row: multiply each top-row entry by its cofactor (the signed determinant of the 2x2 submatrix formed by deleting that entry's row and column) and sum the three products. The sign pattern alternates: plus, minus, plus. The determinant is a single number that describes how the matrix scales area (2x2) or volume (3x3), and it is nonzero exactly when the matrix has an inverse.

Finding the inverse (adjugate method)

When the determinant is not zero, the inverse exists and can be found using the adjugate. For a 2x2 matrix, the adjugate is simple: swap the two diagonal entries (a and d), negate the two off-diagonal entries (b and c), and divide every entry by the determinant. For a 3x3 matrix, compute the 3x3 cofactor matrix, take its transpose to get the adjugate, then divide every entry by the determinant. The inverse is the unique matrix such that A times A-inverse equals the identity matrix. If the determinant is zero the matrix is singular, its rows are linearly dependent, and no inverse exists.

Transpose, trace, and rank explained

The transpose of a matrix is formed by swapping its rows and columns: entry (i, j) moves to position (j, i). The trace is the sum of the main diagonal entries and equals the sum of the eigenvalues. Both trace and determinant are invariant under similarity transformations, making them useful fingerprints of a matrix. The rank is the number of linearly independent rows (equivalently, columns), found by Gaussian elimination. A full-rank n-by-n matrix has rank n, which is equivalent to being invertible. Rank tells you the effective dimensionality of the transformation the matrix represents.

Adjugate and cofactor matrix

Each cofactor C(i, j) of a matrix is the signed minor: C(i, j) = (-1)^(i+j) times the determinant of the submatrix you get by deleting row i and column j. The cofactor matrix collects all n squared cofactors. Transposing the cofactor matrix produces the adjugate (also called the classical adjoint). For any square matrix, A times adj(A) equals det(A) times the identity, which gives the adjugate-based inverse formula: A inverse = adj(A) divided by det(A). The adjugate is always defined, even when the matrix is singular, unlike the inverse itself.

Matrix properties at a glance

PropertyMeaningInvertible?
det = 0Rows are linearly dependent; volume collapses to zero No
det not 0Rows are independent; unique inverse exists Yes
Rank = n (full rank)All rows/columns are linearly independent Yes
Rank < nAt least one row is redundant No
Trace = sum of diagAlso equals sum of eigenvalues Depends on det
Transpose (A^T)Rows become columns; det(A^T) = det(A) Same as A

Quick reference for 2x2 and 3x3 square matrices.

Frequently asked questions

How do I find the determinant of a 2x2 matrix?

Use the formula ad minus bc. Multiply the top-left entry a by the bottom-right entry d, then subtract the product of the top-right entry b and the bottom-left entry c. For a = 4, b = 7, c = 2, d = 6: det = (4 x 6) - (7 x 2) = 24 - 14 = 10.

How do I find the determinant of a 3x3 matrix?

Expand along the first row: det = a * (ei - fh) - b * (di - fg) + c * (dh - eg), where the letters refer to the entries read row by row. Each term is the top-row entry multiplied by the determinant of the 2x2 submatrix formed by deleting that entry's row and column. The signs alternate: +, -, +.

When does a matrix have an inverse?

A square matrix has an inverse exactly when its determinant is not zero. When the determinant is zero, the matrix is called singular, its rows are linearly dependent (at least one row is a combination of the others), and no inverse exists.

What is the trace of a matrix?

The trace is the sum of all entries on the main diagonal, from top-left to bottom-right. For a 2x2 matrix [a, b; c, d] the trace is a + d. For a 3x3 matrix the trace is a + e + i (the three diagonal entries). Trace also equals the sum of the matrix's eigenvalues.

What is the adjugate matrix and how is it different from the inverse?

The adjugate (classical adjoint) is the transpose of the cofactor matrix. Each cofactor equals (-1)^(i+j) times the minor of entry (i, j). For a 2x2 matrix [a, b; c, d] the adjugate is [d, -b; -c, a]. The inverse is the adjugate divided by the determinant, so the adjugate exists even when the matrix is singular, but the inverse does not.

What does the rank of a matrix mean?

Rank is the number of linearly independent rows (or columns). For a 2x2 or 3x3 matrix, row-reduce to echelon form and count the non-zero pivot rows. A full-rank n-by-n matrix has rank n and is invertible. Lower rank means one or more rows are combinations of others and the matrix is singular.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…