lesson

Updated 6 days ago ยท 2 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=(k0โ0kโ).
๐Interactive diagram
Let's test this on an arbitrary point like P=(34โ) with a scale factor of k=2:
(20โ02โ)(34โ)=(2(3)+0(4)0(3)+2(4)โ)=(68โ)