Matrix Calculator
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.
Matrix
Results update instantly as you type
Enter Values
Embed Code
Copy and paste this HTML snippet into any web page to embed this calculator directly.
<iframe src="http://127.0.0.1:54963/embed/math/matrix-calculator?ref=embed" title="Matrix Calculator" width="100%" style="max-width:600px; border:none; height:500px;" loading="lazy"></iframe>
Direct Link
Share this link to let others open the calculator in their browser.
The Formula
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.
Variable Definitions
Matrix
An n×n square matrix of real numbers. Supported sizes: 2×2, 3×3, 4×4, and 5×5.
Determinant
A scalar that encodes properties of the matrix. Zero means the matrix is singular (non-invertible).
Inverse
The matrix that, when multiplied by A, gives the identity matrix. Exists only when det(A) ≠ 0.
How to Use This Calculator
- 1
Select the matrix size: 2×2, 3×3, 4×4, or 5×5.
- 2
Choose an operation: calculate the determinant, the inverse, or both.
- 3
Enter matrix entries row by row. Use one line per row, separating numbers with spaces or commas.
- 4
View the result with step-by-step calculation showing each cofactor expansion or row operation.
Quick Reference
| From | To |
|---|---|
| 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 Applications
- 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
The determinant of a 2x2 matrix: ad - bc
Understanding the Concept
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
Sources & References
Related Calculators
Reviews
No reviews yet. Be the first to share your experience with Matrix Calculator.
Write a Review
