Introduction
A matrix can change the position of every point in a shape using the same simple rule. Depending on its numbers, it can stretch or compress the shape, turn it, reflect it like a mirror, or combine several of these effects. The key idea is that a matrix acts on coordinates: once you know what it does to points, you can understand what happens to an entire line, triangle, or other shape.
What a Matrix Does to a Shape
A shape on a flat coordinate plane can be described by the coordinates of its points. A triangle, for example, can be represented by its three vertices. A square can be represented by four corners. To transform the shape, apply the same matrix to the coordinates of each point.
A two-dimensional matrix commonly used for these transformations has two rows and two columns. Its entries determine how the original horizontal and vertical coordinates contribute to each new coordinate. If a point is written as a column, (x, y), the matrix produces a new point, which we can call (x′, y′).
For a matrix with entries a, b, c, and d, the rule is:
x′ = ax + by
y′ = cx + dy
In other words, the new horizontal coordinate is calculated from the old coordinates, and so is the new vertical coordinate. Applying this rule to every vertex moves the whole shape consistently. Points along the edges move according to the same rule, so straight edges remain straight.
This type of transformation is called a linear transformation. It keeps the origin, (0, 0), fixed, and preserves straight lines. It also preserves parallelism: two parallel lines remain parallel after the transformation, although their direction or spacing may change.
How Matrices Stretch and Compress Shapes
The simplest examples of stretching matrices change the horizontal and vertical coordinates separately. A matrix with 2 in its upper-left entry and 1 in its lower-right entry doubles every horizontal coordinate while leaving vertical coordinates unchanged:
[2 0]
[0 1]
A point at (3, 2), for instance, becomes (6, 2). A square becomes twice as wide but keeps its original height. This is a horizontal stretch by a factor of 2.
Changing the lower-right entry instead produces a vertical stretch. The matrix [1 0; 0 3] leaves horizontal coordinates alone and triples vertical coordinates. A circle under this transformation becomes an ellipse, because its vertical distances from the centre grow more than its horizontal distances.
Values between 0 and 1 produce compression rather than expansion. With [0.5 0; 0 1], each horizontal distance from the vertical axis is halved. A shape becomes narrower, while its height remains the same. A negative entry can also reverse direction: [−1 0; 0 1] reverses horizontal coordinates, which is a reflection rather than an ordinary positive stretch.
Stretching does not have to act along the horizontal and vertical axes. Other matrices can stretch along diagonal directions or combine stretching with a change in orientation. The resulting coordinates depend on how the matrix’s rows and columns mix the original x and y values.
How Matrices Rotate Shapes
A rotation turns a shape around a chosen centre. For a rotation about the origin, the standard matrix for an angle θ is:
[cos θ −sin θ]
[sin θ cos θ]
Here, sine and cosine are familiar functions from geometry that specify the horizontal and vertical parts of a direction. The angle is usually measured from the positive horizontal axis. Under the common coordinate convention in which x increases to the right and y increases upward, a positive angle turns points counterclockwise.
For a 90-degree counterclockwise rotation, cos θ is 0 and sin θ is 1. The matrix becomes [0 −1; 1 0], so the point (x, y) becomes (−y, x). For example, (2, 1) moves to (−1, 2). Its distance from the origin stays the same; only its direction changes.
A rotation preserves lengths and angles, so a rotated triangle has the same side lengths and interior angles as the original. Its location and orientation change, but its size and overall shape do not. These properties distinguish a rotation from a stretch or compression.
A matrix rotation is centred on the origin. To rotate an object around another point, the geometry can be handled in three steps: move the chosen centre to the origin, rotate, and move the centre back. This distinction matters in graphics and diagrams, where an object often turns around a point that is not (0, 0).
How Matrices Reflect Shapes
A reflection flips points across a line, much as a flat mirror reverses an image. Reflecting across the horizontal axis changes (x, y) to (x, −y), using the matrix [1 0; 0 −1]. Reflecting across the vertical axis changes it to (−x, y), using [−1 0; 0 1].
For example, reflecting the point (3, 2) across the horizontal axis gives (3, −2). The point is the same distance from the axis as before, but lies on its opposite side. Points directly on the reflection line stay in place.
Reflections preserve lengths and angles, but they reverse orientation. A shape that has a clockwise order around its vertices will have a counterclockwise order after a reflection. This is why a reflected letter or asymmetrical design may appear reversed even though its dimensions have not changed.
Reflection lines need not be the horizontal or vertical axes. A reflection across a diagonal line can be represented by a different matrix. The details depend on the line’s direction, but the geometric idea is the same: points are flipped across the line while their perpendicular distances from it remain equal.
Combining Transformations
Several transformations can be combined by multiplying their matrices. If a shape is first stretched and then rotated, the combined effect can be represented by one matrix formed from the two individual matrices. Instead of recalculating each stage separately for every point, you can apply the combined matrix once.
The order matters. In general, stretching a shape and then rotating it does not produce the same result as rotating it first and then stretching it. A stretch tied to the horizontal and vertical axes acts in different directions after the shape has been turned. Matrix multiplication records this order, so the written product must match the intended sequence of actions.
Some transformations do commute, meaning their order makes no difference, but this is not true in general. For example, two rotations about the same centre combine into a rotation by the sum of their angles. A rotation and an uneven stretch, by contrast, usually give different results when reversed.
Matrix multiplication can look abstract, but its practical purpose is straightforward: it provides an efficient way to describe a sequence of coordinate changes. This is useful when many points must be transformed repeatedly, as in animation, mapping, and computer-generated images.
What the Determinant Reveals
The determinant is a single number calculated from a square matrix. For a two-by-two matrix [a b; c d], it is ad − bc. In geometry, the determinant gives useful information about how the transformation changes area and orientation.
The absolute value of the determinant is the factor by which areas are scaled. If its value is 3, a region’s area becomes three times as large; if it is 0.5, the area becomes half as large. A negative determinant indicates that orientation has been reversed, as it is in a reflection.
If the determinant is zero, the transformation collapses the plane into a line or a single point. For example, [1 0; 0 0] sends every point (x, y) to (x, 0). All vertical information is lost, and a two-dimensional shape is flattened onto the horizontal axis. Because different original points can then produce the same result, the transformation cannot be undone using an ordinary inverse matrix.
Where Shape Transformations Are Used
Matrix transformations are common in computer graphics. Software uses them to position, rotate, resize, and reflect objects, from simple icons to complex three-dimensional scenes. A shape can be stored once and transformed through its coordinates rather than redrawn by hand for every new position.
They also help describe maps and images. Coordinate systems may need to be rotated or rescaled to compare measurements, align diagrams, or display data. In engineering and design, transformations provide a consistent way to move parts and examine how their positions relate to one another.
The same mathematical framework extends beyond the plane. Three-dimensional transformations use larger matrices to move points in space, including rotations and scaling along three coordinate axes. The central principle remains unchanged: represent points with coordinates, apply a matrix rule, and interpret the resulting points as the transformed object.
What Matrices Do Not Capture by Themselves
A two-by-two matrix represents transformations that keep the origin fixed. It can stretch, rotate, reflect, shear, or combine these effects, but it cannot by itself shift every point by the same amount. A shift, also called a translation, changes a point (x, y) to (x + p, y + q), where p and q specify the horizontal and vertical movement.
Translation can be combined with matrix transformations using an expanded coordinate method called homogeneous coordinates, or by applying the shift as a separate step. For basic work, it is often easiest to transform each point with the matrix and then add the required shift.
It is also important to distinguish a transformation of coordinates from a change in the object itself. A matrix describes how points are mapped to new positions; it does not explain what a shape represents or why it is being moved. The geometric effect comes from the matrix and the coordinates to which it is applied.
Conclusion
Matrices transform entire shapes by applying one coordinate rule to every point. Their entries can stretch or compress distances, rotate objects, reflect them across lines, or combine several effects. Understanding the origin, the order of operations, and the determinant makes these changes easier to predict. The same ideas support practical work in graphics, design, mapping, and geometry.

