Matrices and Geometry
Projection Matrix
Consider a point \( A(x, y) \) in the Cartesian coordinate system. The projection of this point onto the x-axis is the point \( A'(x', y') \), which is the foot of the perpendicular dropped from \( A \) to the x-axis.
Geometrically, it's clear that the x-coordinate remains the same while the y-coordinate becomes zero. Hence:
We can express this using matrix multiplication. Let's rewrite the coordinates of \( A' \) as:
Here, the matrix:
is called a projection matrix. The above matrix is just an example of projection matrices. There can be other projection matrices. In our example above, it "projects" any point \( (x, y) \) onto the x-axis by nullifying the y-coordinate.
Example:
To find the projection of the point \( (9, 8) \) on the x-axis, we multiply the matrix \( \mathbf{P} \) by the column vector \( \begin{bmatrix} 9 \\ 8 \end{bmatrix} \):
So, the projection of the point \( (9, 8) \) onto the x-axis is \( (9, 0) \).
Idempotence of the Projection Matrix
An important property of projection matrices is that they are idempotent. In our example, this can be expressed mathematically as follows:
If we project the point \( A'(x', y') \) again, we get:
Since the projection doesn't change:
Thus:
This implies that:
This property, \( \mathbf{P}^2 = \mathbf{P} \), is called idempotence. A matrix that satisfies this property is called an idempotent matrix. This means that applying the projection matrix multiple times has the same effect as applying it once.
Another example of a projection matrix is one that projects a point onto the y-axis. In this case, the x-coordinate becomes zero, while the y-coordinate remains unchanged.
For a point \( A(x, y) \), its projection onto the y-axis, \( A'(x', y') \), can be expressed as:
This can be represented by the following projection matrix:
Thus, the projection of a point \( (x, y) \) onto the y-axis is:
Example:
For a point \( (7, 5) \), the projection onto the y-axis is:
This means the projection of \( (7, 5) \) on the y-axis is \( (0, 5) \).
Just like the x-axis projection, this matrix is also idempotent, since \( \mathbf{P}^2 = \mathbf{P} \).
Let's work through this example of a projection matrix for the line \( L: 2x - y = 0 \).
We are given: - A point \( A(x, y) \), - The projection of this point \( A'(x', y') \) onto the line \( 2x - y = 0 \).
Using the foot of the perpendicular formula, we have the following relationships:
Solving these, we find the coordinates of the projected point \( A'(x', y') \):
We can express this in matrix form:
Thus, the projection matrix \( \mathbf{P} \) for projecting a point onto the line \( 2x - y = 0 \) is:
Let us confirm that thsi matrix is indeed idempotent (\( \mathbf{P}^2 = \mathbf{P} \)). We will compute \( \mathbf{P}^2 \).
Now, perform the matrix multiplication:
Simplifying each term:
This shows that \( \mathbf{P}^2 = \mathbf{P} \), confirming that the projection matrix is idempotent.
Reflection Matrix
A reflection matrix reflects a point across a given line in the coordinate plane. Let's consider the specific case of reflecting a point across the line \( y = x \).
Reflection Across \( y = x \)
Let \( A(x, y) \) be a point, and let \( A'(x', y') \) be its reflection across the line \( y = x \). Geometrically, we know that when a point is reflected across \( y = x \), the x- and y-coordinates of the point are swapped. Therefore:
This can be written in matrix form as:
Thus, the reflection matrix \( \mathbf{R} \) for reflecting a point across the line \( y = x \) is:
Involutory Property
A key property of reflection matrices is that they are involutory, meaning that \( \mathbf{R}^2 = \mathbf{I} \), where \( \mathbf{I} \) is the identity matrix. This is because applying the reflection twice results in returning to the original point, which is equivalent to multiplying by the identity matrix.
Let's prove that \( \mathbf{R}^2 = \mathbf{I} \).
First, multiply \( \mathbf{R} \) by itself:
Now, perform the matrix multiplication:
Simplifying the terms:
This shows that:
Therefore, the reflection matrix \( \mathbf{R} \) is involutory. Reflecting a point twice across the same line results in the original point, which is the same as applying the identity matrix.
Rotation Matrix
Consider a point \( P(x, y) \) in a 2-dimensional Cartesian coordinate system. We want to rotate this point counterclockwise by an angle \( \theta \) about the origin. After this rotation, the point \( P(x, y) \) moves to a new position \( P'(x', y') \).
Let \( OP \) be the distance from the origin to the point \( P \), denoted as \( r \), and let \( \alpha \) be the angle between the line \( OP \) and the positive x-axis. From trigonometry, the coordinates \( (x, y) \) of the point \( P \) can be written as:
After rotating the point by an angle \( \theta \) counterclockwise, the new angle between the line \( OP' \) and the positive x-axis becomes \( \alpha + \theta \). The coordinates of the new point \( P'(x', y') \) are then:
Using the angle sum identities for sine and cosine:
Substituting these into the expressions for \( x' \) and \( y' \):
Thus, the new coordinates \( (x', y') \) after rotating \( P(x, y) \) by an angle \( \theta \) are:
These equations can be written in matrix form as:
The matrix:
is called the rotation matrix, and it rotates any point \( P(x, y) \) counterclockwise by an angle \( \theta \) around the origin.
Example
Let’s take the point \( P(1, 2) \) and rotate it clockwise by 30 degrees. Since the rotation is clockwise, we will use \( \theta = -30^\circ \).
The rotation matrix for an angle \( \theta \) is:
For \( \theta = -30^\circ \), we have:
Thus, the rotation matrix becomes:
Now, apply this matrix to the point \( P(1, 2) \):
Perform the matrix multiplication:
Thus, the new coordinates of the point after rotating clockwise by 30 degrees are:
Properties of Rotation Matrix
Let’s explore the key properties of the rotation matrix \( \mathbf{R}(\theta) \). The matrix for rotating a point counterclockwise by an angle \( \theta \) around the origin is:
1. Orthogonality: \( \mathbf{R}(\theta) \mathbf{R}(\theta)^\top = \mathbf{I} \)
To show that \( \mathbf{R}(\theta) \) is an orthogonal matrix, we need to demonstrate that \( \mathbf{R}(\theta) \mathbf{R}(\theta)^\top = \mathbf{I} \), where \( \mathbf{R}(\theta)^\top \) is the transpose of \( \mathbf{R}(\theta) \).
The transpose of \( \mathbf{R}(\theta) \) is:
Now, multiply \( \mathbf{R}(\theta) \) by its transpose:
Perform the matrix multiplication:
Using the identity \( \cos^2 \theta + \sin^2 \theta = 1 \), this simplifies to:
Thus, \( \mathbf{R}(\theta) \mathbf{R}(\theta)^\top = \mathbf{I} \), proving that \( \mathbf{R}(\theta) \) is an orthogonal matrix.
2. Composition of Rotations: \( \mathbf{R}(\alpha) \mathbf{R}(\beta) = \mathbf{R}(\alpha + \beta) \)
The composition of two rotations by angles \( \alpha \) and \( \beta \) should result in a rotation by the sum of the angles. Let’s show that \( \mathbf{R}(\alpha) \mathbf{R}(\beta) = \mathbf{R}(\alpha + \beta) \).
We have:
Now, multiply \( \mathbf{R}(\alpha) \) by \( \mathbf{R}(\beta) \):
Perform the matrix multiplication:
Using the angle sum identities:
This simplifies to:
Thus, \( \mathbf{R}(\alpha) \mathbf{R}(\beta) = \mathbf{R}(\alpha + \beta) \).
3. Powers of the Rotation Matrix: \( \mathbf{R}(\theta)^n = \mathbf{R}(n \theta) \)
Let’s show that the \( n \)-th power of the rotation matrix \( \mathbf{R}(\theta) \) is equivalent to rotating by \( n \theta \). This means:
Using the property of composition of rotations \( \mathbf{R}(\alpha) \mathbf{R}(\beta) = \mathbf{R}(\alpha + \beta) \), we can extend this to powers of the rotation matrix.
For example:
And by induction, for any integer \( n \), we get:
4. Inverse of the Rotation Matrix: \( \mathbf{R}(-\theta) = \mathbf{R}(\theta)^{-1} \)
The inverse of a rotation matrix \( \mathbf{R}(\theta) \) corresponds to a rotation by the opposite angle \( -\theta \). To show this, we calculate the inverse of \( \mathbf{R}(\theta) \).
Recall that the inverse of an orthogonal matrix is its transpose, so:
This is precisely the rotation matrix for an angle \( -\theta \):
Thus, \( \mathbf{R}(-\theta) = \mathbf{R}(\theta)^{-1} \), showing that the inverse of a rotation matrix is the matrix for a rotation by the opposite angle.
Rotation in Three Dimensions
In three-dimensional space, rotation matrices allow us to rotate a point about one of the three axes (x-axis, y-axis, or z-axis). The general rotation matrix depends on the axis of rotation. Let’s explore the rotation matrices for rotations about the z-axis, x-axis, and y-axis.
1. Rotation About the z-Axis
Consider a point \( P(x, y, z) \) in 3D space. If we rotate this point counterclockwise by an angle \( \theta \) about the z-axis, the new point \( P'(x', y', z') \) has the following coordinates:
The z-coordinate remains unchanged, while the x- and y-coordinates rotate in the x-y plane, just like in the 2D case. The resulting matrix is called the rotation matrix about the z-axis:
2. Rotation About the x-Axis
Now, consider rotating the point \( P(x, y, z) \) counterclockwise by an angle \( \theta \) about the x-axis. The x-coordinate remains unchanged, while the y- and z-coordinates rotate in the y-z plane. The new point \( P'(x', y', z') \) is given by:
The rotation matrix for a rotation about the x-axis is:
3. Rotation About the y-Axis
Finally, to rotate the point \( P(x, y, z) \) counterclockwise by an angle \( \theta \) about the y-axis, the y-coordinate remains unchanged, while the x- and z-coordinates rotate in the x-z plane. The new coordinates \( P'(x', y', z') \) are:
The corresponding rotation matrix about the y-axis is:
Thus:
-
Rotation about the z-axis:
\[ \mathbf{R}_z(\theta) = \begin{bmatrix} \cos \theta & -\sin \theta & 0 \\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{bmatrix} \] -
Rotation about the x-axis:
\[ \mathbf{R}_x(\theta) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos \theta & -\sin \theta \\ 0 & \sin \theta & \cos \theta \end{bmatrix} \] -
Rotation about the y-axis:
\[ \mathbf{R}_y(\theta) = \begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ -\sin \theta & 0 & \cos \theta \end{bmatrix} \]