Matrix Calculator

Perform 2×2 and 3×3 matrix operations: add, multiply, transpose and determinant

What is it and how does it work?

A matrix calculator performs operations on matrices — rectangular arrays of numbers with rows and columns. Matrices are fundamental to linear algebra, and linear algebra is fundamental to an enormous range of fields: computer graphics (transformations, 3D rendering), machine learning (neural networks, PCA), engineering (structural analysis, circuit simulation), statistics (regression, covariance), and physics (quantum mechanics, general relativity). This calculator handles the most common matrix operations without requiring specialised software.

Supported operations include addition and subtraction (element-wise), multiplication (dot product), scalar multiplication, transpose, determinant, inverse, and rank. Each operation has specific requirements: multiplication requires the inner dimensions to match (m×n times n×p gives m×p); the inverse only exists for square non-singular matrices (determinant ≠ 0). The tool checks these conditions and gives clear error messages when they are not met.

Common use cases

Frequently asked questions

Why does matrix multiplication not commute (AB ≠ BA)?

Unlike number multiplication, matrix multiplication is order-dependent. The entry at row i, column j of AB is the dot product of row i from A and column j from B. Swapping order changes which rows and columns are paired, producing a different result — or making the operation undefined if the swapped dimensions don't match.

When does a matrix have no inverse?

A square matrix has no inverse (is singular) when its determinant is zero. This happens when the rows (or columns) are linearly dependent — one row can be expressed as a combination of others. Geometrically, a singular matrix collapses space to a lower dimension, losing information that can't be recovered.

What is the transpose and why is it useful?

The transpose flips a matrix over its diagonal, turning rows into columns and vice versa. An m×n matrix becomes n×m. It appears in formulas for inner products, the pseudo-inverse, normal equations in regression, and whenever you need to align dimensions for multiplication.

What is the determinant used for?

The determinant is a scalar that captures several properties of the matrix: whether it has an inverse (det ≠ 0), the scale factor by which it transforms area/volume (|det|), and orientation (sign). A determinant of 1 means the transformation preserves area; negative means it flips orientation.

Math

Percentage Calculator · Age Calculator · Date Difference · Scientific Calculator · BMI Calculator · Fibonacci Generator