In the last lesson, we saw how matrix multiplication provides a powerful and efficient way to compose, or chain together, multiple transformations like rotation, scaling, and translation. This ability to create a single composite matrix is a cornerstone of computational geometry.
Today, we will expand our geometric vocabulary by introducing two more fundamental transformations: reflection and shear. You will learn how these operations are represented by matrices and how they can be applied to create symmetrical patterns and dynamic, skewed forms—both common motifs in architectural design. By the end of this lesson, you will be able to construct and apply the matrices for reflection and shear, adding further versatility to your parametric design toolkit.
Reflection: The Mathematics of Symmetry
Symmetry is a defining principle in architecture, from the classical proportions of the Parthenon to the intricate balance of modern structures. The most common type, bilateral symmetry, is mathematically described by the reflection transformation.
A reflection "flips" an object across a line (in 2D) or a plane (in 3D), creating a mirror image. You can see this principle beautifully illustrated in both natural and man-made forms.

Just like the other transformations we've studied, reflection is a linear transformation that can be captured in a matrix. We can determine the matrix for a reflection by observing where it sends the basis vectors. The following video provides a clear, step-by-step derivation for reflections in both 2D and 3D.
Reflections as Matrix Transformations | Linear Algebra
This video from the Wrath of Math channel, "Reflections as Matrix Transformations," demonstrates how to find the standard matrices for various reflection operators. It's a great example of the "math-first" approach you prefer.
First, watch the explanation for reflections in 2D, covering reflections about the x-axis, y-axis, and the line y=x. This section, from 00:42 to 03:51, shows how the transformation of the basis vectors directly builds the columns of the standard matrix. Then, see how the same principle extends to 3D space with reflections about the coordinate planes (XY, XZ, YZ). This is covered from 05:31 to 07:09.
As the video demonstrates, the 2D reflection matrices are quite intuitive. For example, reflecting a point across the x-axis simply negates its y-coordinate, transforming it to . In homogeneous coordinates, which we've been using to combine transformations, the 3x3 matrices for common 2D reflections are:
-
Reflection across the x-axis:
-
Reflection across the y-axis:
-
Reflection across the line :
Applying these is straightforward. To reflect a point , represented by the homogeneous vector , you simply compute the matrix-vector product. For example, reflecting the point across the y-axis:
The result is the point , as expected.
Reflecting across an arbitrary line that doesn't pass through the origin can be achieved by composing transformations: translate the line to the origin, rotate it to align with an axis, perform the reflection, and then apply the inverse rotation and translation to move it back. This elegantly combines the concepts from our previous lesson with what we've learned today.
Shear: The Mathematics of Slanting
While reflection creates balance, shear introduces dynamism and a sense of movement. A shear transformation slants an object by displacing its points in a direction parallel to a line or plane. A great visual analogy is pushing a deck of cards from the side—the bottom card stays put, while the top cards slide over.
In this clip from a familiar 3Blue1Brown video, you can see exactly how a shear transformation affects the coordinate system.
Linear transformations and matrices | Chapter 3, Essence of linear algebra
This short segment provides an excellent visual intuition for a shear transformation.
Watch the clip from 08:26 to 08:49. Notice how the basis vector \hat{i} stays fixed, while \hat{j} is shifted, causing the entire grid to slant.
This transformation can turn a simple, static grid into a dynamic pattern, as seen in the facade below.

Let's define shear mathematically. In 2D, we typically consider horizontal and vertical shears.
- A horizontal shear with factor transforms a point to . The y-coordinate remains unchanged, while the x-coordinate is shifted by an amount proportional to .
- A vertical shear with factor transforms a point to . The x-coordinate remains unchanged, while the y-coordinate is shifted by an amount proportional to .
We can formulate this in matrix form. For an in-depth look at the matrices, let's turn to a textual resource.
This section of the "Linear Algebra" bookdown text provides a concise mathematical description of 2D shearing.
Please read the section titled 2D Shearing. It clearly lays out the formulas for horizontal and vertical shearing and provides a worked example.
Based on this, the corresponding 3x3 homogeneous matrices for 2D shear are:
-
Horizontal shear by factor :
-
Vertical shear by factor :
To see the effect, let's apply a horizontal shear with to a square with corners at . The point would be transformed as follows:
The point moves from to , while a point on the x-axis like would remain unchanged. The result is a parallelogram.
Shear also exists in 3D, where it is defined relative to a plane. For example, shearing can shift points in the x-direction based on their z-coordinate. This is represented by a 4x4 matrix, a topic we will formalize in our next lesson. Here's a quick look at such a matrix from a guide on computational design.
[PDF] Essential Mathematics for computational design - Third Edition
This document provides matrices for various 3D transformations, including shear, in a format commonly used in design software.
In the section on "Shear transformation," look at the first example matrix under Shear in x and z. The first matrix shown, "Shear x-axis," demonstrates a shear in 3D. Notice the 0.5 in the first row, third column. This indicates that a point's x-coordinate is shifted by an amount proportional to its z-coordinate.
This 4x4 matrix is a preview of how we'll handle 3D transformations more formally, but the underlying principle of modifying coordinates based on others remains the same.
Conclusion
In this lesson, we have added reflection and shear to our arsenal of geometric transformations. These operations, while simple mathematically, unlock a vast range of aesthetic possibilities in architectural design, from creating perfect symmetry to introducing dynamic, non-rectilinear forms.
Here are the main takeaways:
- Reflection creates a mirror image of an object across an axis (2D) or a plane (3D). It is the mathematical basis for symmetry.
- Shear slants or skews an object by shifting points parallel to a fixed axis, with the displacement proportional to the distance from that axis.
- Both reflection and shear are linear transformations and can be represented by matrices, allowing them to be applied and composed just like rotation, scaling, and translation.
We have now explored the full set of fundamental affine transformations in 2D. In our next lesson, we will systematically extend these concepts into three dimensions by using 4x4 homogeneous coordinate matrices. This will provide us with a unified and robust framework for manipulating any object in 3D space, preparing us for the practical modeling tasks ahead in Rhino and Grasshopper.