Machine Learning Engineeringexplorer

Matrix transform visualiser

A 2×2 matrix is a rule that moves every point of the plane. It sends the point (x, y) to (ax + by, cx + dy). Straight lines stay straight, the origin stays put and the grid stays a grid, though the squares may become parallelograms.

0 is the identity (nothing moves), 1 is the full matrix. In between is a straight blend of the entries.

Orientation kept

Areas scale by 3 and the orientation is kept.

Determinant3ad − bc
λ1 = 3λ2 = 1îĵî′ĵ′
Before: grid, unit square, î and ĵ (dashed)After: î′ = (2, 1), ĵ′ = (1, 2)Eigenlines (long dashes); the circle marks a vector before, the arrow after

Matrix

Entries (the columns are where î and ĵ land)
Determinant3The unit square’s area (1) becomes 3.
OrientationKeptTurning from î′ to ĵ′ is still anticlockwise, as from î to ĵ.
Trace4a + d, the sum of the eigenvalues.
Rank2Invertible.
Reading the determinant

det = ad − bc = 2 × 2 − 1 × 1 = 3. Its size is how much every area is scaled; a negative sign means the plane is flipped over.

What it shows

Two numbers sum up what a matrix does. The determinant says how much areas scale, and its sign says whether the plane was flipped over. The eigenvectors are the directions that only stretch or shrink, never turn. Some matrices, such as a rotation, have none.

Pick a preset or type the four entries, then watch the grid move. You can animate the move from the identity, which changes nothing, to the full matrix.

How to read it

  • Grey dashed shapes are before: the grid, the unit square and the arrows î and ĵ. Coloured shapes are after.
  • The arrows î′ and ĵ′ show where î and ĵ land. The legend gives their coordinates.
  • Determinant is the area of the transformed unit square. “Flipped” means the picture is mirrored. “Collapsed” means the square became a line or a point.
  • With “Show eigenvectors” on, long dashes mark each eigenline. A circle is a vector before, an arrow is the same vector after, scaled by λ.
  • Complex eigenvalues mean every vector turns, so no eigenline is drawn.
  • “Animate from identity” respects reduced motion: it jumps to the end.

Questions

What does the determinant of a 2×2 matrix mean?

It is the factor by which the matrix scales areas. A determinant of 3 turns the unit square, area 1, into a parallelogram of area 3, and does the same to any shape. The formula for [[a, b], [c, d]] is ad − bc.

What does a negative determinant mean?

The matrix flips the plane over, like a mirror. Areas still scale by the size of the determinant, but the order of the arrows reverses: if î′ to ĵ′ turns anticlockwise for a positive determinant, it turns clockwise for a negative one.

What is a singular matrix?

One with determinant 0. It squashes the plane onto a line or a single point, so different inputs can give the same output and no inverse exists. The columns lie along one line, which is why the unit square flattens.

Why can eigenvalues be complex?

A real eigenvector needs a direction that the matrix does not turn. A rotation turns every direction, so none exists. The quadratic for the eigenvalues then has no real roots, and the complex pair re ± im × i carries the turn.

Why does the tool use column vectors?

It is the convention in most linear algebra courses, including MIT 18.06: the matrix multiplies a column vector from the left. Some graphics and machine learning code uses row vectors instead, which transposes the matrix.

Learn it properly

Sources

Explore further

Last updated

More tools

All tools

Your first senior-level
lesson is free.

Choose a course, open a free lesson, and explore an idea you’ve wanted to understand.