How to use it
The picture shows the plane before and after a 2×2 matrix A acts on it. The faint grey grid is the original plane and the blue grid is where it ends up. The green arrow î and the red arrow ĵ show where the basis vectors (1, 0) and (0, 1) land, and those two landing points are exactly the two columns of the matrix. Drag either arrow, or type numbers into the matrix, and everything else follows. Press Play to watch the plane move from the identity (nothing changed) to your matrix.
Controls
- Mouse or touch: drag the tip of î, ĵ or the grey test vector v. The page does not scroll while your finger is on the plane.
- Keyboard: focus the plane, press I, J or V to choose an arrow and use the arrow keys to nudge it. Space plays the animation.
- Matrix: four number boxes a, b, c, d. “Snap” rounds dragged arrows to steps of 0.5 or 0.25.
- Animate: the slider blends from the identity (t = 0) to A (t = 1). “Apply inverse” undoes A and brings every point back.
- Presets: rotation, scaling, shear, reflection, projection and more, each with its general formula and sliders for the angle or factors.
- Copy link: copies an address that carries the matrix as
?m=a,b,c,d, so you can share it.
How it works
A linear transformation keeps sums and multiples: T(u + v) = T(u) + T(v) and T(kv) = kT(v). As a result the origin stays fixed and grid lines stay straight, parallel and evenly spaced. Every vector (x, y) is x times î plus y times ĵ, so its image is x times the first column plus y times the second:
The determinant ad − bc is the signed area of the parallelogram that the unit square becomes. Every area is multiplied by its absolute value. A negative determinant means the plane has been flipped over, so the letter F turns into its mirror image. A determinant of zero squashes the plane onto a line or a point.
The inverse matrix undoes the transformation. It exists exactly when the determinant is not zero:
Composition is matrix multiplication. Doing A first and then B is the single matrix BA, read from right to left. Order usually matters: rotating and then shearing is not the same as shearing and then rotating, so BA and AB differ.
An eigenvector is a non-zero vector that stays on its own line through the origin: Av = λv. The eigenvalue λ is the stretch factor along that line, and a negative λ reverses the direction. The eigenvalues solve λ² − (a + d)λ + (ad − bc) = 0. When this equation has no real solution, as for a rotation, no direction is preserved.
These ideas are everyday tools. Computer graphics rotates, scales and shears every point of an image or model with matrices. Robotics uses rotation matrices to convert between the coordinate frame of each joint and that of the workspace. In data analysis, principal component analysis looks for the eigenvectors of a covariance matrix.
Things to try
- Choose Rotation and turn on the eigen-lines. Except at 0° and 180° the eigenvalues are complex and no line survives.
- Choose Shear x. Shapes lean over, yet the determinant stays 1, so no area changes, and only one eigen-direction is left.
- Drag ĵ across î. The determinant passes through zero, turns negative and the F becomes a mirror image.
- Load the Singular preset. The plane collapses onto a line and no inverse exists.
- In the composition panel press “Demo: rotation and shear” and compare BA with AB. Then make both matrices rotations and see that they commute.
- Show the unit circle. Its image is an ellipse whose semi-axes are the singular values; their product equals |det A|.
Frequently asked questions
Why are the columns of a matrix the images of the basis vectors?
Multiplying A by (1, 0) keeps only the first column, and multiplying by (0, 1) keeps only the second. So the columns are literally where î and ĵ go.
What does a negative determinant mean?
The orientation is reversed: a counter-clockwise loop becomes clockwise, like looking in a mirror. Areas are still scaled by the absolute value.
Why is there no inverse when the determinant is zero?
Many different points land on the same point, so the information about where they came from is lost and cannot be recovered.
Can a 2×2 matrix shift the whole plane sideways?
No. A linear map always leaves the origin in place. Graphics software handles shifts by adding a third coordinate and using 3×3 matrices.
Why does a 180° rotation shrink to a point half-way through the animation?
The animation blends each matrix entry in a straight line from the identity to A. Half-way between the identity and a half-turn is the zero matrix. The start and the end are still exact.