Matrix Calculator
Free matrix calculator for 2×2 and 3×3 matrices. Add, subtract, multiply, determinant, inverse, transpose, and scalar multiply online.
Matrix Calculator
Add, subtract, multiply matrices, find determinant & inverse. Original EvealCalc tool — not affiliated with Desmos.
Matrix A
Matrix B
Result
Supports 2×2 and 3×3 matrices. Inverse shown only when determinant ≠ 0.
Linear algebra runs the hidden math behind graphics, robotics, economics, and machine learning — and it starts with matrices. This matrix calculator handles 2×2 and 3×3 arrays: add, subtract, multiply, find determinants and inverses, transpose, and scale by a constant, with step hints where helpful.
How to Use This Calculator
Choose matrix size (2×2 or 3×3). Enter values in Matrix A — defaults suggest an identity-like pattern you can overwrite. For operations needing a second operand (add, subtract, multiply), fill Matrix B as well.
Select an operation from the toolbar: A + B, A − B, A × B, det(A), A⁻¹, Aᵀ, or k × A. Scalar multiply reveals a scalar input field for k.
Click Calculate. Results appear in a grid matching output dimensions — a 2×2 sum stays 2×2; a determinant collapses to a single value display; inverse shows the inverse matrix when it exists (determinant ≠ 0).
Reset restores default grids. Switch operations without reloading — matrix B hides automatically for unary ops like determinant or transpose. Note matrix multiplication is not commutative: A × B generally differs from B × A.
What Is Matrix Arithmetic?
A matrix is a rectangular array of numbers arranged in rows and columns. Two matrices of the same dimensions add by adding corresponding entries — no cross terms. Subtraction mirrors addition with negated B entries. These element-wise operations model independent linear combinations stacked in parallel.
Matrix multiplication is richer: row-by-column dot products. For A (m×n) times B (n×p), entry (i,j) of the product sums A row i against B column j. Inner dimensions must match — you cannot multiply 2×3 by 2×2 without alignment error. The calculator enforces compatible sizes for square 2 and 3 cases.
The determinant measures scaling factor and invertibility for square matrices. Zero determinant means no inverse — geometrically, transformation collapses dimension. Inverse A⁻¹ satisfies A·A⁻¹ = I, the identity matrix. Transpose swaps rows and columns. Scalar multiply k·A scales every entry by k, uniform dilation in linear map language.
These operations form the grammar of linear systems Ax = b, coordinate transforms, and Markov chains — this tool executes the grammar numerically for small sizes students encounter first.
When to Use This Calculator
Use it to verify homework matrix products and inverses without arithmetic drift across nine or more manual multiplications. Physics students transform vectors between bases; economics students multiply input-output tables; graphics hobbyists compose rotation and scale matrices in 2D demos.
When teaching, live-demo why det = 0 blocks inversion — enter a dependent row set and watch the error. Compare A×B versus B×A side by side to cement non-commutativity. Quick determinant checks tell you if a system has a unique solution before Gaussian elimination by hand.
Researchers prototyping small linear models sanity-check dimensions before coding NumPy or MATLAB scripts. Competitive exam takers under time pressure confirm one critical multiply step that would otherwise cost partial credit if wrong.
For larger matrices, eigenvalues, or row-reduced echelon form, graduate to CAS or numerical libraries — this widget targets pedagogical 2×2 and 3×3 clarity, not high-performance LA suites.
Understanding Your Results
Addition and subtraction output same-size grids with entry-wise results. Multiplication output size matches square choice when both operands are n×n. Inspect diagonals and symmetries when expecting special structures — symmetry is not preserved under multiply in general.
Determinant for 2×2 uses ad − bc; for 3×3 the calculator applies cofactor expansion or equivalent stable formula. Near-zero determinants may show scientific notation — interpret tiny values as singular within floating tolerance.
Inverse displays only when determinant is non-zero; otherwise expect an error explaining singularity. Multiply A·A⁻¹ informally on paper spot-check to see identity approximations. Transpose flips off-diagonal entries across the main diagonal — involution operation applying twice returns original A.
Scalar multiply uniformly scales entries — useful modeling uniform weighting or converting units row-wise. Step text when shown walks through one row of multiplication for learning — read it alongside the numeric grid.
Real-World Applications
Computer graphics pipelines multiply 4×4 matrices (specialized tools handle those) but 2×2 blocks teach rotation: [[cos θ, −sin θ], [sin θ, cos θ]]. Robotics forward kinematics chains transformation matrices. Markov transition matrices multiply to predict state distributions over steps — 3×3 examples fit toy state models.
Economics Leontief input-output analysis uses (I − A)⁻¹b formulas — small A matrices build intuition before national-scale data. Control theory discretizes systems into xₖ₊₁ = Axₖ — eigenanalysis follows, but numeric A products start here.
Chemistry balances can encode stoichiometric systems as matrices; statistics uses covariance matrices for variance propagation. Machine learning layers are matrix multiplies — tiny hand examples demystify what frameworks automate at scale.
Every application shares dimension discipline and multiply associativity (AB)C = A(BC) even when AB ≠ BA. Master 2×2 and 3×3 numerically here, then trust software for thousand-dimensional jobs knowing what operation means underneath.
Supply-chain and logistics models occasionally encode small networks as matrices before scaling to optimization software — practicing on paper-sized examples builds confidence that rows and columns represent meaningful units, not abstract grids alone.
Formula
Variables Explained
- A, B: Input matrices with entries aᵢⱼ in row i, column j.
- det(A): Determinant — scalar indicating invertibility and volume scaling.
- A⁻¹: Multiplicative inverse satisfying A·A⁻¹ = I when det ≠ 0.
- Aᵀ: Transpose — rows become columns.
- k: Scalar constant for uniform entry scaling.
Worked Example
Problem: Multiply A = [[1, 2], [3, 4]] by B = [[2, 0], [1, 2]].
Entry (1,1): 1×2 + 2×1 = 4.
Entry (1,2): 1×0 + 2×2 = 4.
Entry (2,1): 3×2 + 4×1 = 10.
Entry (2,2): 3×0 + 4×2 = 8.
Product: [[4, 4], [10, 8]]. Select 2×2, enter A and B, choose A × B, Calculate to confirm.
Determinant of A: 1×4 − 2×3 = −2 (non-zero, so A⁻¹ exists).
Common Mistakes
- Multiplying entry-wise instead of row-column. A×B is not aᵢⱼ × bᵢⱼ — it uses dot products across inner index.
- Reversing multiply order. AB and BA differ — operand order buttons reflect A on left, B on right.
- Adding mismatched sizes. Cannot add 2×2 to 3×3; pick consistent dimension.
- Expecting inverse when det = 0. Dependent rows or columns mean singular matrix.
- Forgetting transpose is not inverse. Aᵀ rearranges entries; only orthogonal special cases coincide with A⁻¹.
Helpful Tips
- Always verify det(A) before hand-computing A⁻¹ — saves time when singular.
- Use identity matrix as B to test whether A·I equals A in multiply mode.
- For 3×3 determinants, watch sign patterns on cofactor expansion — tool removes tedium but learn once on paper.
- Round displayed floats knowing tiny residuals like 1e-15 are floating noise, not math errors.
- Follow with our scientific calculator for scalar checks inside larger proofs.
- Label rows and columns with variable names on paper (x, y, z or u, v) so matrix entries represent coefficients in a system you can solve, not anonymous numbers in a grid.
Frequently Asked Questions
2×2 and 3×3 square matrices for all listed operations.
When determinant equals zero, the matrix is singular and has no inverse.
No. In general AB ≠ BA. Order in the operation selector matters.
Yes. Entries accept any real numbers within normal input limits.
No. This is an original EvealCalc tool inspired by common classroom needs, not affiliated with third-party graphing or matrix apps.
Not currently. Operations listed are add, subtract, multiply, determinant, inverse, transpose, and scalar multiply.