🟦
Matrix Inputs
Matrix Size
Operation
Matrix A
Matrix B
📐
Key Facts
Determinant 2×2
det = ad − bc
Inverse 2×2
A⁻¹ = (1/det) × [[d,−b],[−c,a]]
Transpose
Swap rows and columns
Multiplication
(AB)ᵢⱼ = Σ Aᵢₖ × Bₖⱼ
Singular matrix
det = 0 → no inverse exists
Identity I
A × I = I × A = A

Every 3D Game Frame You See Was Produced by Matrix Multiplication

When a character in a 3D game rotates, moves or appears from a different camera angle, the engine multiplies transformation matrices. A rotation matrix rotates every vertex. A translation matrix moves it. A projection matrix converts 3D coordinates to 2D screen space. These are chained as a single multiplication per frame, repeated 60 or more times per second for every object in the scene. Modern video games, architectural visualisations, medical imaging — all of it is matrix multiplication running at massive scale. This calculator performs the same six core operations on 2×2 and 3×3 matrices that underpin all of it.

This free online matrix calculator handles addition, subtraction, multiplication, determinant, inverse and transpose. Enter values directly into the grid cells — results appear instantly with det(A) always displayed for reference. Use the Identity and Zero preset buttons for quick matrix setup without manually entering values.

Why Matrix Multiplication Is Not Commutative

In regular arithmetic, 3 × 4 = 4 × 3. With matrices, A × B ≠ B × A in general — this is not an edge case, it is the fundamental rule. Each result element depends on multiplying an entire row of A against an entire column of B. Change the order and you are multiplying different rows against different columns. Try it in this calculator: enter any non-symmetric A and B, compute A × B, then swap and compute B × A. The results will usually differ significantly.

This non-commutativity has real consequences in practice. In physics, the order of rotation operations matters — rotating 90° around X then 90° around Y gives a different final orientation than the reverse. In neural networks, the order of weight matrices is fixed and meaningful. In robotics, the sequence of joint transformation matrices determines end-effector position. Understanding that matrix multiplication has direction is the core conceptual shift from scalar to matrix thinking.

The Determinant: What It Measures and Why Zero Breaks Everything

The determinant is a single number that encodes whether a matrix transformation preserves volume. For a 2×2 matrix, |det(A)| is the area of the parallelogram formed by the two column vectors. If det(A) = 0, those vectors are linearly dependent — they collapse to a line, destroying one dimension. A matrix with zero determinant is called singular, and it has no inverse. This is why the calculator always shows det(A): it tells you at a glance whether the matrix is invertible before you even try the inverse operation.

Solving a system of linear equations Ax = b requires A to be invertible — if det(A) = 0, either no solution or infinitely many solutions exist. For a 3-variable system, enter the coefficients into Matrix A, compute A⁻¹, then multiply A⁻¹ by your b vector. This is exactly the approach used in circuit analysis with Kirchhoff's laws, in structural stiffness matrices, and in economic input-output models. Use alongside the Scientific Calculator for the individual arithmetic when verifying results manually.

Machine Learning Runs on Matrix Operations

A neural network forward pass is a chain of matrix multiplications: input × weight matrix, apply activation, × next weight matrix, and so on. Backpropagation computes gradients by transposing weight matrices and multiplying in reverse. The normal equations for linear regression are (XᵀX)⁻¹Xᵀy — a matrix inverse and two multiplications. Principal Component Analysis (PCA) decomposes a covariance matrix. Every recommendation system, image classifier and language model at its mathematical core is doing what this calculator does, just with matrices containing millions of values instead of nine. For eigenvalue analysis and larger matrices beyond 3×3, dedicated tools like NumPy or MATLAB are appropriate. Everything in this calculator runs in your browser — no matrix values are transmitted anywhere.

Verified by ToollyX Team · Last updated June 2026

Frequently Asked Questions