lesson

Updated 1 month ago · 8 views
Every time you pinch to zoom on a smartphone or resize a character in a video game engine, the computer runs a simple matrix calculation on thousands of points simultaneously.
To understand how matrices resize shapes, we look at where the two fundamental building blocks of the coordinate plane go: the basis vectors.
The Basis Vector Blueprint
Any point (x,y) on the plane is built from the standard unit vectors i^=(10) along the x-axis and j^=(01) along the y-axis.
When a 2×2 matrix transforms the plane, its first column tells you where i^ lands, and its second column tells you where j^ lands.
📊Interactive diagram
What happens if we want to stretch the entire world evenly in all directions?
Uniform Scaling
In uniform scaling, every coordinate expands or shrinks by the exact same scale factor, k.
Because i^=(10) scales to (k0) and j^=(01) scales to (0k), the transformation matrix is simply S=(k00k).
📊Interactive diagram
Let's test this on an arbitrary point like P=(34) with a scale factor of k=2:
(2002)(34)=(2(3)+0(4)0(3)+2(4))=(68)