Contents
What this calculator does Formula Worked example How to use it When to use it Key takeaways Frequently asked questions
What this calculator does
The matrix calculator runs determinant, inverse, multiply, add/subtract, transpose, trace, scalar multiple, and identity operations on editable matrices with dimension checks.
Formula
For a 2×2 matrix A = [[a, b], [c, d]]:
det(A) = ad - bc
A^{-1} = (1/det(A)) × [[d, -b], [-c, a]] when det(A) ≠ 0
Multiply: if A is m×n and B is n×p, then (AB)_{ik} = Σ_j A_{ij} B_{jk}.
Transpose: (A^T)_{ji} = A_{ij}.
Trace (square only): tr(A) = Σ_i A_{ii}.
Addition needs identical shapes. Singular matrices (det = 0) have no inverse.
Worked example
A = [[1, 2], [3, 4]].
det(A) = 1×4 - 2×3 = 4 - 6 = -2.- Inverse:
(1/-2) × [[4, -2], [-3, 1]] = [[-2, 1], [1.5, -0.5]]. - Check:
A A^{-1} = I(within ordinary floating error).
Transpose of A is [[1, 3], [2, 4]]. Trace is 1 + 4 = 5.
How to use it
- Enter matrix A in the grid (rows × columns).
- Enter matrix B when the operation needs two matrices.
- Choose the operation: multiply, determinant, inverse, and related ops.
- Set a scalar when using scalar multiplication.
- Read the bracketed result or the dimension/singular error message.
- Adjust sizes so inner dimensions match before multiplying.
When to use it
Use matrix ops for linear systems setup, graphics transforms, covariance work, and coursework checks. Dimension rules fail fast here: multiply needs A's column count equal to B's row count, and inverse needs a square non-singular matrix.
Floating-point inverses of ill-conditioned matrices look plausible yet amplify input noise. If |det| is tiny relative to entry scale, treat the inverse as numerically unstable even when the tool returns a matrix.
3D surface plotting of z = f(x,y) is a different tool. Keep algebraic matrix work on this page and geometric meshes on the graphing page.
Key takeaways
- Match inner dimensions before multiplying two matrices.
- Compute 2×2 determinants as
ad - bc; larger sizes use the engine's expansion. - Reject inverse when the determinant is zero.
- Sum the main diagonal for trace on square matrices.
- Swap rows and columns for transpose without changing entries' values.
Frequently asked questions
When is a matrix invertible?
A square matrix is invertible when its determinant is not zero (full rank). If det = 0, rows or columns are linearly dependent and no inverse exists. The calculator returns a singular error instead of inventing a pseudoinverse on this page.
Why did multiply fail with a dimension message?
Matrix multiplication needs the left matrix column count to equal the right matrix row count. A 2×3 times a 2×2 fails; a 2×3 times a 3×4 succeeds and yields 2×4. Addition is stricter: both shapes must match exactly.
How do I read the determinant sign?
A negative determinant means the linear transform reverses orientation (in 2D, a reflection component). Magnitude scales area (2D) or volume (3D). Zero means collapse onto a lower-dimensional image and blocks inversion.
What is the trace used for?
Trace sums diagonal entries of a square matrix. It equals the sum of eigenvalues (counting algebraic multiplicity) and appears in invariants of similarity transforms. It is undefined for non-square inputs on this tool.
Does the calculator row-reduce to RREF?
Where the operation list includes reduced row echelon form, the engine returns the RREF matrix for system solving and rank checks. Use RREF when you need pivot structure; use inverse when you explicitly need A^{-1} for a non-singular square matrix.
Are results exact fractions?
Entries display as decimals from floating-point arithmetic. Small residuals after A A^{-1} are normal. For exact rational homework, scale examples to integers and verify by hand with fractions when the decimal form obscures a simple value.