Matrix Calculator — Free Online Calculator with Step-by-Step Guide
Calculate the determinant and inverse of square matrices from 2×2 to 5×5. Shows step-by-step calculation with LaTeX-style formatting for college assignments.
The formula
det(A) = sum of signed cofactor products | A⁻¹ = adj(A) / det(A)
- A
- Matrix
- det(A)
- Determinant
- A⁻¹
- Inverse
How Matrix Calculator Works
det(A) = sum of signed cofactor products | A⁻¹ = adj(A) / det(A)
The determinant is a scalar value computed from a square matrix that indicates whether the matrix is invertible (det ≠ 0) or singular (det = 0). The inverse of a matrix A, denoted A⁻¹, satisfies A × A⁻¹ = I (the identity matrix). For a 2×2 matrix [[a, b], [c, d]], the determinant is ad − bc and the inverse is 1/(ad−bc) × [[d, −b], [−c, a]]. For larger matrices, the inverse is computed as the adjugate matrix divided by the determinant.
- A
- Matrix — An n×n square matrix of real numbers. Supported sizes: 2×2, 3×3, 4×4, and 5×5.
- det(A)
- Determinant — A scalar that encodes properties of the matrix. Zero means the matrix is singular (non-invertible).
- A⁻¹
- Inverse — The matrix that, when multiplied by A, gives the identity matrix. Exists only when det(A) ≠ 0.
How to Use
- Select the matrix size: 2×2, 3×3, 4×4, or 5×5.
- Choose an operation: calculate the determinant, the inverse, or both.
- Enter matrix entries row by row. Use one line per row, separating numbers with spaces or commas.
- View the result with step-by-step calculation showing each cofactor expansion or row operation.
Quick Reference
| 2×2 Determinant ([[a,b],[c,d]]) | ad − bc |
| 2×2 Inverse ([[a,b],[c,d]]) | 1/(ad−bc) × [[d, −b], [−c, a]] |
| Identity Matrix (2×2) | [[1, 0], [0, 1]] |
| Zero Matrix (3×3) | All entries are 0 |
| Singular Matrix Condition | det(A) = 0 — no inverse exists |
| 3×3 Determinant (Rule of Sarrus) | aei + bfg + cdh − ceg − bdi − afh |
Common Uses
- •Computer graphics — transformation matrices for 3D rendering, rotation, scaling, and translation of objects in games and CAD software
- •Machine learning — weight matrices in neural networks and covariance matrices in dimensionality reduction (PCA)
- •Engineering — solving systems of linear equations in structural analysis, circuit simulation, and control systems
- •Economics — input-output models that track how changes in one industry sector propagate through the entire economy
- •Robotics — inverse kinematics matrices that calculate joint angles needed to reach a desired end-effector position
Understanding the Result
Matrix operations are fundamental to linear algebra and have applications in computer graphics (transformation matrices), physics (systems of linear equations), machine learning (weight matrices), and engineering (finite element analysis). The determinant of a 2×2 matrix is ad − bc. For larger matrices, the determinant is computed via Laplace expansion (also called cofactor expansion), where you expand along a row or column, computing signed minors recursively. For a 3×3 matrix, the Rule of Sarrus provides a visual shortcut. The inverse exists only when the determinant is non-zero — a matrix with zero determinant is called singular or degenerate, meaning its rows (or columns) are linearly dependent. A singular matrix represents a transformation that collapses space (maps multiple inputs to the same output), which is why it cannot be reversed.
Frequently Asked Questions
- What does the determinant tell us about a linear transformation?
- The determinant represents the scaling factor of the linear transformation. In 2D, |det| is the area scaling factor — a determinant of 3 means the transformation multiplies areas by 3. In 3D, it is the volume scaling factor. A negative determinant indicates that the transformation reverses orientation (flips the space). A zero determinant means the transformation collapses the space into a lower dimension, which is why it is not invertible.
- When is a matrix invertible?
- A square matrix is invertible (non-singular) when its determinant is not zero. This means its rows (and columns) are linearly independent — no row can be expressed as a linear combination of the others. Equivalent conditions: the matrix has full rank, its null space contains only the zero vector, and it represents a bijective (one-to-one and onto) linear transformation.
- How do I compute the determinant of a 3×3 matrix?
- For a 3×3 matrix [[a, b, c], [d, e, f], [g, h, i]], the determinant is a(ei − fh) − b(di − fg) + c(dh − eg). This is called cofactor expansion along the first row, or the Rule of Sarrus when visualized as diagonal products. You can also expand along any row or column by taking the sum of each element times its cofactor (signed minor).
- Why is a matrix without an inverse called singular?
- The term "singular" comes from the geometric interpretation: a singular matrix represents a linear transformation that collapses space into a lower dimension, which is a "singular" or degenerate case. For example, projecting a 3D object onto a 2D plane collapses the z-dimension — this transformation has determinant zero and is non-invertible because you cannot recover the lost depth information.
- Where are matrix determinants used in real-world applications?
- Determinants are used in computer graphics for 3D transformations and collision detection, in machine learning for understanding whether a covariance matrix is invertible, in engineering for analyzing system stability, in economics for input-output models, and in robotics for inverse kinematics calculations. Any field that uses systems of linear equations relies on determinants to determine whether a unique solution exists.
Cite this calculator
TheCalcUniverse. "Matrix Calculator — Free Online Calculator with Step-by-Step Guide." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/matrix-calculator/. Accessed July 24, 2026.
Embed this calculator on your site
You may also like
-
Quadratic Solver
Solve any quadratic ax²+bx+c=0 with the quadratic formula. Get real or complex roots, discriminant, vertex, ax…
-
Distance Calculator
Calculate the Euclidean distance between two points in 1D, 2D, or 3D space. Shows the distance formula, step-b…
-
Basic Calc
A full-featured basic calculator with number pad, history tape, and order-of-operations support. Perfect for q…
-
Scientific Calc
Full-featured online scientific calculator with trigonometric functions, logarithms, memory operations, and ca…