Matrix Calculator
A matrix calculator performs operations on rectangular arrays of numbers. Multiply matrices by taking dot products of rows and columns — columns of A must equal rows of B. The determinant (scalar from a square matrix) is zero when the matrix is singular. The inverse A⁻¹ satisfies AA⁻¹ = I. Transpose swaps rows and columns. Trace sums diagonal elements.
Perform matrix operations online: addition, subtraction, multiplication, scalar multiply, determinant, transpose, inverse, and trace. Two matrix inputs with configurable dimensions up to 6×6. Step-by-step solutions for determinant (cofactor expansion) and inverse (Gauss-Jordan elimination). Copy results as formatted text.
Works OfflineDark ModeNo Ads
Matrix A
Matrix B
Two-Matrix Operations
Scalar Multiply
×
Single-Matrix Operations
Matrix A
Matrix B
How to Use
- Enter your value in the input field
- Click the Calculate/Convert button
- Copy the result to your clipboard
Frequently Asked Questions
- How do you multiply two matrices?
- To multiply matrix A (m×n) by matrix B (n×p), each entry in the result is the dot product of a row from A and a column from B. The number of columns in A must equal the number of rows in B. The result is an m×p matrix. For example, a 2×3 matrix times a 3×2 matrix gives a 2×2 matrix.
- What is a matrix determinant?
- The determinant is a scalar value computed from a square matrix. For a 2×2 matrix [[a,b],[c,d]], det = ad − bc. For larger matrices, it is calculated by cofactor expansion along a row or column. The determinant is zero if and only if the matrix is singular (not invertible).
- How do you find the inverse of a matrix?
- A matrix inverse A⁻¹ satisfies A × A⁻¹ = I (identity matrix). Common methods include Gauss-Jordan elimination (augmenting [A|I] and row-reducing to [I|A⁻¹]) and the adjugate method (A⁻¹ = adj(A)/det(A)). Only square matrices with non-zero determinants have inverses.
- What is the trace of a matrix?
- The trace is the sum of the diagonal elements of a square matrix. For a 3×3 matrix with diagonal elements a₁₁, a₂₂, a₃₃, trace = a₁₁ + a₂₂ + a₃₃. The trace is invariant under similarity transformations and equals the sum of eigenvalues.
- What is matrix transpose?
- The transpose of a matrix flips it over its diagonal — rows become columns and columns become rows. For an m×n matrix A, the transpose Aᵀ is n×m where (Aᵀ)ᵢⱼ = Aⱼᵢ. A symmetric matrix equals its own transpose.
- When can you add or subtract matrices?
- Matrix addition and subtraction require both matrices to have the same dimensions (same number of rows and same number of columns). The operation is performed element-by-element: (A ± B)ᵢⱼ = Aᵢⱼ ± Bᵢⱼ.