Free Matrix Calculator

Matrix algebra written in chalk on a green blackboard
Photo: Yulia Meshkova / Wikimedia Commons, CC BY 4.0

Published: 15 November 2026  ·  Updated: 15 November 2026

Add, subtract and multiply 2×2 and 3×3 matrices, and find determinants, inverses and transposes — with the working shown. It starts with A = [[4, 7], [2, 6]] and B = [[1, 2], [3, 4]], giving A × B = [[25, 36], [20, 28]]. Free, no sign-up, and it never invents an inverse when none exists.

MixKhazana · Quick answer

Full-size grids, instant answers. Pick 2×2 or 3×3, type your matrices, choose the operation. Determinants show their working, and singular matrices get an honest “no inverse” instead of a wrong answer.

Researched by MixKhazana Team · Last updated 15 November 2026 · Data: OpenStax Algebra and Trigonometry (Cramer's rule); College Board AP calculator policy

Example: With A = [[4, 7], [2, 6]] and B = [[1, 2], [3, 4]], A × B = [[25, 36], [20, 28]], det(A) = 10, and A⁻¹ = [[0.6, −0.7], [−0.2, 0.4]]. Switch the operation box to check each one.
Order matters. Matrix multiplication is not commutative: A × B usually differs from B × A. Addition and subtraction need matching sizes; multiplication needs the columns of A to match the rows of B (always true for two same-size square matrices here).

What is a matrix calculator?

A matrix is a rectangular grid of numbers, and a matrix calculator does arithmetic with whole grids at once: adding, subtracting and multiplying them, and finding the determinant and inverse of a square matrix. Matrices appear in linear algebra, computer graphics, economics and engineering, and solving systems of equations is their most common classroom job: a system of equations can be written as A·x = b, and when A has an inverse the solution is x = A⁻¹·b.

Handheld graphing calculators include matrix menus, but their small screens make entering a 3 × 3 matrix fiddly. This free tool gives you a full-size grid, shows the working for determinants, and refuses to invent an inverse when none exists.

How to use this matrix calculator

  1. Choose the size: 2 × 2 or 3 × 3. The grids refill with worked examples you can overwrite.
  2. Type your numbers into Matrix A and Matrix B.
  3. Pick the operation: add, subtract, multiply, determinant of A, inverse of A, or transpose of A. The result appears instantly.
  4. For the determinant, read the working line under the answer — it shows the exact arithmetic, which is what markers want to see.

Matrix formulas

For A = [[a, b], [c, d]] and a 3 × 3 matrix with first row a, b, c:

  • Addition / subtraction: entries combine position by position: (A + B)ij = Aij + Bij
  • Multiplication: (A × B)ij = sum over k of Aik × Bkj — row i of A dotted with column j of B
  • Determinant (2 × 2): det(A) = ad − bc
  • Determinant (3 × 3): det(A) = a(ei − fh) − b(di − fg) + c(dh − eg), expanding along the first row
  • Inverse (2 × 2): A⁻¹ = (1 / (ad − bc)) × [[d, −b], [−c, a]], valid only when ad − bc ≠ 0
  • Inverse (3 × 3): A⁻¹ = adj(A) / det(A), where adj(A) is the transpose of the cofactor matrix
  • Transpose: (Aᵀ)ij = Aji — rows and columns swap

A matrix has an inverse exactly when its determinant is not zero. The determinant also decides whether a system of equations has a unique solution: with Cramer's rule, each unknown is a ratio of determinants, and a zero determinant means no unique solution exists.

Worked example

Let A = [[4, 7], [2, 6]] and B = [[1, 2], [3, 4]]:

  • A + B = [[5, 9], [5, 10]] — add matching entries
  • A × B = [[4×1+7×3, 4×2+7×4], [2×1+6×3, 2×2+6×4]] = [[25, 36], [20, 28]]
  • det(A) = 4×6 − 7×2 = 24 − 14 = 10
  • A⁻¹ = (1/10) × [[6, −7], [−2, 4]] = [[0.6, −0.7], [−0.2, 0.4]]
  • Check: A × A⁻¹ = [[1, 0], [0, 1]], the identity matrix, as it must be

Try it above: the defaults are these two matrices — switch the operation box to see each result.

Results for the example matrices

OperationResult
A + B[[5, 9], [5, 10]]
A − B[[3, 5], [−1, 2]]
A × B[[25, 36], [20, 28]]
det(A)10
A⁻¹[[0.6, −0.7], [−0.2, 0.4]]
Aᵀ[[4, 2], [7, 6]]

For the 3 × 3 default, A = [[2, 1, 1], [1, 2, 1], [1, 1, 2]] has det(A) = 4 and A⁻¹ = [[0.75, −0.25, −0.25], [−0.25, 0.75, −0.25], [−0.25, −0.25, 0.75]].

Solving systems with matrices

To solve 4x + 7y = 1 and 2x + 6y = 3, write the coefficient matrix A = [[4, 7], [2, 6]] and the constants b = [1, 3]. Since det(A) = 10 ≠ 0, the solution is unique: x = A⁻¹·b = [[0.6, −0.7], [−0.2, 0.4]] × [1, 3] = [0.6 − 2.1, −0.2 + 1.2] = [−1.5, 1]. Check: 4(−1.5) + 7(1) = 1 and 2(−1.5) + 6(1) = 3. Cramer's rule gives the same answer as ratios of determinants, and this tool's determinant is the piece you need for either method.

Frequently asked questions

How do I multiply two matrices?

Multiply row by column: the entry in row i, column j of A x B is the dot product of row i of A with column j of B. For 2x2 matrices that is four dot products. This tool shows the result instantly; the worked example above shows every step.

Why is A x B different from B x A?

Matrix multiplication is not commutative: rows of the first matrix meet columns of the second, so swapping the order pairs different numbers. In general A x B and B x A are different matrices, and for non-square matrices one of the two products may not even exist.

What does the determinant tell me?

For a 2x2 matrix det(A) = ad - bc. It tells you whether the matrix has an inverse (only when it is not zero) and whether a system of equations has a unique solution. Geometrically it measures how the matrix scales areas.

When does a matrix have no inverse?

Exactly when its determinant is zero. Such a matrix is called singular. This tool says so plainly instead of printing a wrong matrix: division by a zero determinant is meaningless.

How is a 3x3 determinant calculated?

By expanding along a row: det(A) = a(ei - fh) - b(di - fg) + c(dh - eg), where each bracket is a 2x2 determinant (a minor) and the signs alternate +, -, +. The same diagonal method taught in textbooks gives the identical number.

How is a 3x3 inverse calculated?

From cofactors: each entry of the cofactor matrix is (-1) raised to i+j times the 2x2 determinant left after deleting that row and column. Transpose the cofactor matrix to get the adjugate, then divide by the determinant.

What is the transpose of a matrix?

The matrix with rows and columns swapped: the entry in row i, column j of A-transpose is the entry in row j, column i of A. The transpose of [[4, 7], [2, 6]] is [[4, 2], [7, 6]].

Can I solve equations with this tool?

Yes, indirectly: find the inverse of the coefficient matrix, then multiply it by the constants column. The section above works a full example. If the determinant is zero, the system has no unique solution and another method is needed to tell whether it has none or infinitely many.

Sources

Disclaimer: a study aid for homework and revision. Results are rounded to four decimal places for display; exact fractions (such as 3/5 for 0.6) are the same values. It is not an approved exam-room device.

Related tools

Function graph plotted on axes on paper with a pencil beside it
📈

Free Graphing Calculator

Plot functions and read values from the curve.

Open →
Electronic calculator
📐

Free Quadratic Equation Calculator

Roots, vertex and discriminant for any quadratic.

Open →
Scientific calculator close-up on a green background
🔬

Free Scientific Calculator

Trig, logs and powers with degree and radian modes.

Open →
Electronic calculator
%

Free Percentage Calculator

Percentages, increases and decreases in one step.

Open →

Card photos: Sergey Meshkov / Pexels, Pexels licence · Coyau / Wikimedia Commons, CC BY-SA 3.0 · Joost J. Bakker / Wikimedia Commons, CC BY 2.0

Your next step

Working with equations? Solve quadratics exactly with the Free Quadratic Equation Calculator, or see the curve with the Free Graphing Calculator.

Share:
Disclaimer: The information and estimates on this page are for general guidance only and are not professional financial, legal or medical advice — always verify with official sources before acting. Photos on this page are copyright-free originals, credited to the photographer and source with the licence noted.