A Lot Of Tools
Toggle language
Toggle theme

Matrix Calculator

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

Matrix Calculator

How to Use the Matrix Calculator

Select a matrix size (2×2 or 3×3) and choose an operation. Enter the values for each matrix element and click Calculate to see the result.

Matrix Operations

Addition and Subtraction

Matrix addition and subtraction are performed element by element. Both matrices must have the same dimensions. The result is a matrix of the same size.

Multiplication

Matrix multiplication combines rows of the first matrix with columns of the second. Each element in the result is the dot product of a row from A and a column from B. Note that matrix multiplication is not commutative: A×B ≠ B×A in general.

Determinant

The determinant is a scalar value that provides important information about the matrix:

  • If det(A) ≠ 0, the matrix is invertible
  • If det(A) = 0, the matrix is singular (no inverse exists)
  • The absolute value relates to the scaling factor of the linear transformation

Transpose

The transpose of a matrix is obtained by flipping it over its main diagonal, effectively converting rows to columns and vice versa. If A is an m×n matrix, its transpose Aᵀ is an n×m matrix.

Inverse

The inverse of a matrix A (denoted A⁻¹) is a matrix such that A × A⁻¹ = I, where I is the identity matrix. A matrix has an inverse only if its determinant is non-zero.

Worked Example: Determinant and Inverse of a 2×2 Matrix

Take the matrix A with rows [4, 7] and [2, 6]. The determinant of a 2×2 matrix [[a, b], [c, d]] is ad − bc, so det(A) = 4×6 − 7×2 = 24 − 14 = 10. Because the determinant is non-zero, A is invertible. The 2×2 inverse formula is A⁻¹ = (1/det) × [[d, −b], [−c, a]], which gives A⁻¹ = (1/10) × [[6, −7], [−2, 4]] = [[0.6, −0.7], [−0.2, 0.4]]. You can verify this by multiplying A × A⁻¹ — the result is the identity matrix [[1, 0], [0, 1]].

For 3×3 matrices the calculator uses cofactor expansion for the determinant and the adjugate method for the inverse, so you never have to perform Gaussian elimination by hand.

Applications of Matrices

  • Computer graphics and 3D transformations
  • Solving systems of linear equations
  • Data analysis and machine learning
  • Physics simulations and engineering
  • Economics and financial modeling
  • Network analysis and graph theory

Frequently Asked Questions

What matrix sizes and operations does this calculator support?+

The calculator handles 2×2 and 3×3 matrices and performs six operations: addition, subtraction, multiplication, determinant, transpose, and inverse. For addition, subtraction, and multiplication you enter two matrices; determinant, transpose, and inverse only need one.

Why does the calculator say my matrix has no inverse?+

A matrix is invertible only when its determinant is non-zero. If det(A) = 0 the matrix is called singular — its rows or columns are linearly dependent, so no matrix A⁻¹ satisfying A × A⁻¹ = I exists. Check whether one row is a multiple of another, which is the most common cause.

Does the order matter when multiplying two matrices?+

Yes. Matrix multiplication is not commutative, so A×B and B×A generally give different results. Each entry of A×B is the dot product of a row of A with a column of B, and swapping the order changes which rows pair with which columns.

How is the determinant of a 3×3 matrix computed?+

The calculator expands along the first row: det = a(ei − fh) − b(di − fg) + c(dh − eg) for the matrix [[a, b, c], [d, e, f], [g, h, i]]. This cofactor expansion is exactly the method taught in linear algebra courses, so you can use the tool to check homework step by step.

Is this matrix calculator free, and does it work on mobile?+

Yes. It is completely free with no sign-up, and every computation runs locally in your browser — no data is sent to a server. The layout is responsive, so it works equally well on phones, tablets, and desktops.