🔢 Matrix Calculator
Add, subtract, multiply matrices and more
Matrix Addition
Matrix A
Matrix B
Result
Matrix Operations Guide
Matrix Addition & Subtraction
Matrices must have the same dimensions. Add or subtract corresponding elements.
Example: [1 2] + [5 6] = [6 8]
[3 4] [7 8] [10 12]
Matrix Multiplication
The number of columns in the first matrix must equal the number of rows in the second matrix. Result has dimensions: (rows of A) × (columns of B).
Formula: C[i,j] = Σ(A[i,k] × B[k,j])
Transpose
Flip the matrix over its diagonal. Rows become columns and columns become rows.
Example: [1 2]ᵀ = [1 3]
[3 4] [2 4]
Determinant
Only defined for square matrices. Represents the scaling factor of the transformation.
2×2: det([a b; c d]) = ad - bc
3×3: Use cofactor expansion
Inverse
Only exists for square matrices with non-zero determinant. A × A⁻¹ = I (identity matrix).
Formula: A⁻¹ = (1/det(A)) × adj(A)
Frequently Asked Questions
What is the maximum matrix size supported?
▼This calculator supports matrices up to 5×5. For larger matrices, the calculations become computationally intensive and may take longer. Most practical applications in education and basic engineering use matrices of this size or smaller.
Why can't I multiply my matrices?
▼Matrix multiplication requires that the number of columns in the first matrix equals the number of rows in the second matrix. For example, you can multiply a 2×3 matrix by a 3×2 matrix (resulting in a 2×2 matrix), but you cannot multiply a 2×3 matrix by a 2×3 matrix.
What does "singular matrix" mean?
▼A singular matrix is a square matrix that has a determinant of zero. Singular matrices do not have an inverse. This typically occurs when the rows or columns of the matrix are linearly dependent (one row/column can be expressed as a combination of others).
How do I calculate a 3×3 determinant?
▼For a 3×3 matrix, use the rule of Sarrus or cofactor expansion. The calculator uses cofactor expansion: multiply each element in the first row by the determinant of the 2×2 matrix that remains after removing that element's row and column, alternating signs (+, -, +).
What is the identity matrix?
▼The identity matrix is a square matrix with 1s on the main diagonal and 0s elsewhere. It acts as the multiplicative identity in matrix algebra: A × I = I × A = A. When you multiply a matrix by its inverse, you get the identity matrix.
Can I add matrices of different sizes?
▼No, matrix addition and subtraction require both matrices to have exactly the same dimensions. You can only add or subtract corresponding elements, so the matrices must have the same number of rows and columns.
What are the practical applications of matrices?
▼Matrices are used extensively in computer graphics (transformations, rotations), solving systems of linear equations, quantum mechanics, economics (input-output models), network analysis, machine learning algorithms, cryptography, and engineering simulations. They're fundamental to linear algebra and many areas of applied mathematics.