How to write a linear transformation as a matrix
A linear transformation respects vector addition and scalar multiplication. That means its action on the coordinate vectors tells us how it acts on every vector. Let’s use those images to build a matrix for a reflection and a stretch.
Put the coordinate-vector images in the columns
For a linear map from the plane to the plane, put in the first column and in the second. Since , the matrix then gives .
Combine a horizontal stretch with a reflection
A horizontal stretch by changes to . A reflection over the horizontal axis changes to . Together, the transformation is .
Transform the triangle vertices
| Original vertex | Image |
|---|---|
Connecting the images in the original order gives the transformed triangle. A matrix with m rows and n columns represents a linear map taking n-component inputs to m-component outputs.