Matrix Calculator
Add, multiply, transpose, and find the determinant of 2×2 and 3×3 matrices.
Matrix A
Matrix B
About this tool
The Matrix Calculator performs core matrix operations on 2x2 and 3x3 matrices, including addition, multiplication, transposition, and the determinant. It removes the tedious, error-prone work of carrying out these calculations by hand.
Enter the entries for your matrices, then choose the operation you need such as add, multiply, transpose, or determinant, and read the result instantly. It is handy for linear algebra homework, double-checking work you did manually, and tackling computer graphics or physics problems.
Keep in mind that matrix multiplication requires the inner dimensions to match and is not commutative, so the order of the matrices matters. Everything runs locally in your browser, so your data never leaves your device.
Frequently Asked Questions
Code Implementation
import numpy as np
A = np.array([[1, 2], [3, 4]])
B = np.array([[5, 6], [7, 8]])
# Addition
print("A + B =\n", A + B)
# Multiplication (dot product)
print("A @ B =\n", A @ B)
# Determinant
print("det(A) =", np.linalg.det(A)) # -2.0
# Inverse (exists only if det ≠ 0)
print("A^-1 =\n", np.linalg.inv(A))
# Transpose
print("A^T =\n", A.T)
# Eigenvalues and eigenvectors
vals, vecs = np.linalg.eig(A)
print("Eigenvalues:", vals)
print("Eigenvectors:\n", vecs)
# Solve linear system Ax = b
b = np.array([1, 2])
x = np.linalg.solve(A, b)
print("Solution x:", x) # A @ x == bComments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.