March 26, 20264 min read

Matrix Calculator — Add, Multiply, Transpose, Inverse & Determinant

Perform matrix operations online: addition, subtraction, multiplication, transpose, inverse, and determinant for 2×2, 3×3, and larger matrices.

matrix linear algebra determinant inverse calchub
Ad 336x280

Matrix math is one of those things where the concept isn't hard — it's the arithmetic that trips people up. Keeping track of which row multiplies which column, carrying a sign error through an inverse calculation, accidentally transposing a dimension. The CalcHub Matrix Calculator takes care of the arithmetic so you can focus on what the numbers actually mean.

Supported Operations

OperationWhat It Does
Addition / SubtractionElement-wise, requires matching dimensions
Scalar MultiplicationMultiply every element by a number
Matrix MultiplicationRow × column dot products
TransposeFlip rows and columns
DeterminantSingle scalar value, square matrices only
InverseA⁻¹ such that A × A⁻¹ = I
PowerA², A³, etc. for square matrices

How to Use It

  1. Select the matrix size (2×2, 3×3, or enter custom dimensions).
  2. Fill in the elements row by row.
  3. For two-matrix operations, fill in the second matrix too.
  4. Choose the operation and click Calculate.
The result displays with all intermediate steps — especially useful for determinants and inverses, which involve multiple sub-calculations.

Quick Reference: Matrix Multiplication Rules

This is where most errors happen. Two matrices A (m×n) and B (n×p) can be multiplied only when the inner dimensions match — the column count of A must equal the row count of B. The result is an m×p matrix.

A (2×3) × B (3×2) → Result is (2×2). Valid.

A (2×3) × B (2×3) → Invalid — inner dimensions don't match.

Each element (i,j) of the result is the dot product of row i from A and column j from B.

Determinant: 2×2 and 3×3

2×2:

det | a b | = ad − bc

| c d |

3×3 (cofactor expansion):

det = a(ei − fh) − b(di − fg) + c(dh − eg)

where the letters refer to positions in the 3×3 grid. The determinant tells you whether a matrix is invertible (nonzero) or singular (zero = not invertible).

Inverse of a 2×2 Matrix

A = | a b | A⁻¹ = (1/det) × | d −b |

| c d | | −c a |

For a = 4, b = 7, c = 2, d = 6:


  • det = (4×6) − (7×2) = 24 − 14 = 10

  • A⁻¹ = (1/10) × | 6 −7 | = | 0.6 −0.7 |

| −2 4 | | −0.2 0.4 |

Practical Applications

  • Solving linear systems: A system of equations can be written as Ax = b; the solution is x = A⁻¹b (when A is invertible).
  • Graphics/transformations: Rotation and scaling matrices are the backbone of 2D/3D transformations in computer graphics.
  • Statistics: Covariance matrices, regression calculations — all matrix operations under the hood.
  • Network analysis: Adjacency matrices represent graph connections; matrix powers reveal path counts between nodes.

Tips

  • If the determinant is zero, the matrix is singular — no inverse exists. The calculator will flag this rather than giving you nonsense.
  • For large matrices, use the step display to catch where an error might have crept in during manual checks.
  • Multiplication is not commutative for matrices: A×B ≠ B×A in general. The order matters.

Why can't I multiply a 3×2 matrix by a 3×2 matrix?

Matrix multiplication requires the number of columns in the first matrix to equal the number of rows in the second. A 3×2 matrix has 2 columns, but your second matrix has 3 rows — those don't match. You'd need to transpose one of them first.

My matrix has a determinant close to zero but not exactly zero — is the inverse reliable?

A near-zero determinant (like 0.000001) means the matrix is nearly singular. The computed inverse will exist but will have very large values, amplifying any numerical errors. This is called being "ill-conditioned." For practical purposes, treat near-zero determinants as singular.

What's the identity matrix and why does it matter?

The identity matrix I is a square matrix with 1s on the diagonal and 0s everywhere else. Multiplying any matrix by I returns that same matrix — it's the matrix equivalent of multiplying by 1. It's the target result when you multiply a matrix by its inverse: A × A⁻¹ = I.


Related calculators: Quadratic Equation Solver · Graphing Calculator · Scientific Calculator
Ad 728x90