Matrix Operations Explorer
Explore matrix addition, multiplication, transpose, determinant, and inverse for 2×2 matrices
Try these examples:
Matrix Operations Explorer
Matrices are rectangular arrays of numbers that represent linear transformations. Define two matrices below and explore their arithmetic.
Define Matrix
| Col 1 | Col 2 | |
|---|---|---|
| Row 1 | ||
| Row 2 |
Define Matrix
| Col 1 | Col 2 | |
|---|---|---|
| Row 1 | ||
| Row 2 |
Addition:
Multiplication: vs
In general -- matrix multiplication is not commutative.
Determinants
The Unit Square under B, AB and BA
| Quantity | Value |
|---|---|
The product property always holds, and the picture shows why. A matrix sends the unit square to the parallelogram spanned by its columns, and the area of that parallelogram is . The product means "apply , then ": scales every area by , then scales it again by , so the square ends up with area . (The sign of the determinant records whether the square was flipped over.) Applying them in the other order, , usually gives a differently shaped parallelogram, because , but always one with the same area. Adjust
Transpose:
Inverse:
Since =
Try dragging
Summary
| Property | ||
|---|---|---|
| Trace () | ||
| Determinant | ||
| Invertible? | Yes | Yes |
Drag any entry in or above -- every result on this page updates instantly.
Try it in Code
import numpy as np
A = np.array([[2, 1],
[0, 1]])
B = np.array([[1, -1],
[1, 1]])
print("A + B =\n", A + B)
print("\nA @ B =\n", A @ B)
print("\nB @ A =\n", B @ A)
print(f"\ndet(A) = {np.linalg.det(A):.2f}, det(B) = {np.linalg.det(B):.2f}")
print(f"det(AB) = {np.linalg.det(A @ B):.2f}, det(A)*det(B) = {np.linalg.det(A)*np.linalg.det(B):.2f}")
if np.linalg.det(A) != 0:
print(f"\nA^(-1) =\n{np.round(np.linalg.inv(A), 3)}")What to explore next
Dot & Cross Product Calculator
Calculate dot product, cross product, angle, and projection for 2D and 3D vectors
Eigenvalue Calculator
Calculate eigenvalues and eigenvectors of 2×2 matrices with characteristic polynomial visualization
Eigenvalue Visualization
Visualize eigenvectors and eigenvalues of 2x2 matrices - see how special vectors remain on their span under transformation
Linear Transformation Visualizer
Visualize how 2×2 matrices transform space with determinant, trace, and transformation type analysis
You might also like
3x3 Matrix Operations
Calculate matrix addition, multiplication, and transpose for 3x3 matrices
Matrix Operations Calculator
Calculate sum, difference, product, and scalar multiplication for matrices
2D Matrix Transformations
ExplorationInteractive 2D transformation explorer - visualize how matrices transform space through scaling, rotation, shearing, and reflection
3×3 Determinant
Calculate the determinant of a 3×3 matrix using cofactor expansion