Life goals

Matrix Calculator

What is the determinant or inverse of my matrix?

Type the numbers of each row with spaces, and put a semicolon between rows, like 4 7; 2 6. Pick what you want and get the answer with steps.

Free, no sign-upPrivate — runs in your browserUpdated November 2026
Answers as you type
More
det(A)
10
A is 2 × 2
Invertible?
Yes
Trace (sum of diagonal)
10
Matrix A
[4, 7; 2, 6]
Step-by-step solution
  1. For a 2 × 2 matrix [a b; c d], the determinant is ad − bc.
  2. det = 4 × 6 − 7 × 2 = 24 − 14 = 10.

What can I do with my answer?

  1. Use a semicolon or a new line between rows, and spaces or commas between numbers in a row.
  2. A matrix with determinant 0 has no inverse — check the determinant first.
  3. Order matters when multiplying: A × B is usually not the same as B × A.

People also use

Learn more

At a glance

Type a matrix row by row, like "4 7; 2 6", and find its determinant, inverse or transpose, or multiply, add and subtract two matrices — with the working shown.

Formula2 × 2: det [a b; c d] = ad − bc
Also searched asmatrix calculator · determinant calculator · inverse matrix calculator · matrix multiplication calculator · 3x3 determinant · 2x2 inverse matrix

How to use the matrix calculator

Type matrix A in the box row by row. Separate the numbers in a row with spaces or commas, and separate rows with a semicolon or a new line. For example, 4 7; 2 6 is the 2 × 2 matrix with first row 4, 7 and second row 2, 6, and 1 2 3; 0 1 4; 5 6 0 is a 3 × 3 matrix. Decimals and simple fractions such as 1/2 are accepted. Then pick an operation:

  • Determinant — a single number, with the full working.
  • Inverse — shown as exact fractions when the entries are whole numbers, plus decimals and a check that A × A⁻¹ = I.
  • Transpose — rows turned into columns.
  • Multiply, add or subtract — a second box appears for matrix B.

If something is mistyped, the error message names the matrix, the row and the entry, for example "Matrix A, row 2: 'x' is not a number", or tells you when rows have different lengths.

Determinant formulas

2 × 2: det [a b; c d] = ad − bc
3 × 3: det [a b c; d e f; g h i] = a(ei − fh) − b(di − fg) + c(dh − eg)

The 3 × 3 formula is called cofactor (or Laplace) expansion along the first row: each entry of the top row multiplies the 2 × 2 determinant left when you cross out its row and column, with signs alternating +, −, +. The determinant tells you how the matrix scales area (2 × 2) or volume (3 × 3), and whether it can be inverted: a determinant of 0 means no inverse exists.

Worked example

For the default matrix A = [4 7; 2 6]:

  • det(A) = 4 × 6 − 7 × 2 = 24 − 14 = 10.
  • For the inverse, swap the diagonal entries and change the signs of the other two to get the adjugate [6 −7; −2 4], then divide by 10: A⁻¹ = [3/5, −7/10; −1/5, 2/5], or in decimals [0.6, −0.7; −0.2, 0.4].
  • Check: 4 × 0.6 + 7 × (−0.2) = 2.4 − 1.4 = 1, and 4 × (−0.7) + 7 × 0.4 = 0, which is the first row of the identity matrix.

A classic 3 × 3 example is [1 2 3; 0 1 4; 5 6 0]. Its determinant is 1(0 − 24) − 2(0 − 20) + 3(0 − 5) = −24 + 40 − 15 = 1, and its inverse is the whole-number matrix [−24 18 5; 20 −15 −4; −5 4 1].

Matrix multiplication

To multiply A × B, each entry of the result is a row of A "dotted" with a column of B: multiply matching numbers and add. For [1 2; 3 4] × [5 6; 7 8], the top-left entry is 1 × 5 + 2 × 7 = 19, and the full product is [19 22; 43 50]. The number of columns in A must equal the number of rows in B, and in general A × B ≠ B × A. Addition and subtraction are simpler: the matrices must be the same size, and you combine entries in the same position.

Where matrices are used

Matrices are a compact way to handle many numbers at once. They solve systems of linear equations — the system of equations calculator uses the same determinants through Cramer's rule — and they rotate and scale images in computer graphics, model networks and Markov chains, and run the calculations behind statistics and machine learning. Our standard deviation calculator covers the simpler statistics side.

Common mistakes

  • Multiplying entry by entry. Matrix multiplication is row-times-column, not position-by-position.
  • Getting the sign pattern wrong in a 3 × 3 determinant — the middle term is subtracted.
  • Trying to invert a singular matrix. If the determinant is 0 (for example [1 2; 2 4], where one row is double the other), no inverse exists.
  • Rounding decimals early, which makes A × A⁻¹ come out slightly off. Use the exact fraction form where possible.

Sources: formulas follow standard linear algebra references, including Gilbert Strang, Introduction to Linear Algebra (determinants, cofactors and the adjugate formula for the inverse) and OpenStax College Algebra, section 7.5–7.8.

Checked by the Calcivia team using our checking rules · Last updated .
Cite or link to this page

Using this matrix calculator in an article, report or homework? Copy a citation or a ready-made link:

APACalcivia. (2026). Matrix Calculator. Retrieved November 11, 2026, from https://www.calcivia.com/matrix-calculator/
MLA"Matrix Calculator." Calcivia, 2026, https://www.calcivia.com/matrix-calculator/. Accessed 11 Nov. 2026.
HTML link<a href="https://www.calcivia.com/matrix-calculator/">Matrix Calculator</a> by Calcivia
Did this help you?

Questions people ask

How do you find the determinant of a 3×3 matrix?

Expand along the first row: a(ei − fh) − b(di − fg) + c(dh − eg). Each top-row entry multiplies the 2×2 determinant left after crossing out its row and column, with signs +, −, +.

When does a matrix have no inverse?

When its determinant is 0. That happens when one row (or column) is a combination of the others, so the matrix squashes space flat and cannot be undone.

How do you find the inverse of a 2×2 matrix?

For [a b; c d], swap a and d, change the signs of b and c, and divide every entry by ad − bc. For [4 7; 2 6] that gives [0.6 −0.7; −0.2 0.4].

Can you multiply a 2×3 matrix by a 3×2 matrix?

Yes. The inner sizes match (3 and 3), so the product is a 2×2 matrix. A 2×3 times a 2×3 is not defined.

Is A × B the same as B × A?

Usually not. Matrix multiplication is not commutative, so the order changes the result, and sometimes only one order is even defined.