Learn more
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.
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
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.
Cite or link to this page
Using this matrix calculator in an article, report or homework? Copy a citation or a ready-made link:
Calcivia. (2026). Matrix Calculator. Retrieved November 11, 2026, from https://www.calcivia.com/matrix-calculator/"Matrix Calculator." Calcivia, 2026, https://www.calcivia.com/matrix-calculator/. Accessed 11 Nov. 2026.<a href="https://www.calcivia.com/matrix-calculator/">Matrix Calculator</a> by Calcivia