Matrix Calculator
Perform matrix operations including addition, multiplication, determinants, and inverses with step-by-step outputs.
Matrix A
Matrix B
Operations
Result
How to Use the Matrix Calculator
- Set Dimensions: Adjust the "Rows" and "Cols" for Matrix A and Matrix B to your desired size. The input grids will update automatically (max 10x10).
- Fill in Values: Enter the elements for each matrix. You can use integers (5), decimals (2.5), or fractions (1/2).
- Select Operation: Click the button for the operation you want to perform (e.g., [A + B], [A × B], [det(A)]).
- View Result: The result will be displayed in the "Result" section. If the operation is mathematically impossible (like adding matrices of different sizes), an error message will appear.
Understanding Matrix Operations
A matrix is a rectangular array of numbers arranged in rows and columns. This calculator supports the fundamental operations of linear algebra.
Matrix Addition and Subtraction (A ± B)
To add or subtract two matrices, they must have the **exact same dimensions**. The operation is performed by adding or subtracting the corresponding elements.
$(A - B)_{ij} = A_{ij} - B_{ij}$
Matrix Multiplication (A × B)
To multiply Matrix A (dimensions $m \times n$) by Matrix B (dimensions $p \times q$), the number of **columns in A ($n$) must equal the number of rows in B ($p$)**. The resulting matrix will have dimensions $m \times q$.
This means each element $(AB)_{ij}$ is the dot product of the $i$-th row of A and the $j$-th column of B. Note that matrix multiplication is **not commutative** (A × B ≠ B × A).
Determinant of a Matrix (det(A))
The determinant is a scalar value that can only be computed for a **square matrix** (e.g., 2x2, 3x3). It provides important information about the matrix, such as whether it is invertible.
- For a 2x2 matrix: $\text{det}(A) = ad - bc$
- For a 3x3 matrix (Cofactor Expansion):
$\text{det}(A) = a(ei - fh) - b(di - fg) + c(dh - eg)$
Inverse of a Matrix (A⁻¹)
The inverse of a matrix A, denoted $A⁻¹$, is a matrix such that $A \times A⁻¹ = I$ (the identity matrix). An inverse only exists if the matrix is **square** and **non-singular** (its determinant is not zero).
Where $C^T$ is the transpose of the cofactor matrix (also known as the adjugate or classical adjoint of A). If $\text{det}(A) = 0$, the matrix is singular and has no inverse.
Transpose of a Matrix (Aᵀ)
The transpose of a matrix is found by swapping its rows and columns. The element at $A_{ij}$ becomes the element at $(A^T)_{ji}$.
Frequently Asked Questions (FAQ)
What is a matrix calculator used for?
What makes a matrix singular?
Is matrix multiplication commutative?
What is an identity matrix?
Formula (LaTeX) + variables + units
','
$(A + B)_{ij} = A_{ij} + B_{ij}$ $(A - B)_{ij} = A_{ij} - B_{ij}$
$(AB)_{ij} = \sum_{k=1}^{n} A_{ik} B_{kj}$
$A^{-1} = \frac{1}{\text{det}(A)} C^T$
- No variables provided in audit spec.
- NIST — Weights and measures — nist.gov · Accessed 2026-01-19
https://www.nist.gov/pml/weights-and-measures - FTC — Consumer advice — consumer.ftc.gov · Accessed 2026-01-19
https://consumer.ftc.gov/
Last code update: 2026-01-19
- Initial audit spec draft generated from HTML extraction (review required).
- Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
- Confirm sources are authoritative and relevant to the calculator methodology.