Translations: Using Matrices to Translate

How can matrices be used to translate geometric shapes in a coordinate plane? What is the translation matrix and how does it work?

1 Answers

✓ Best Answer

Understanding Translations with Matrices 📐

In linear algebra, matrices provide a powerful way to perform geometric transformations, including translations. A translation moves every point of a shape by the same distance in a given direction. Here's how it works:

The Translation Matrix ➕

For a 2D translation, we typically use a 3x3 matrix. However, to perform a translation using matrix multiplication, we represent each point as a homogeneous coordinate. A point $(x, y)$ becomes $(x, y, 1)$. The translation matrix is then given by:


$$\begin{bmatrix}
1 & 0 & t_x \\
0 & 1 & t_y \\
0 & 0 & 1
\end{bmatrix}$$

Where:

  • $t_x$ is the translation distance along the x-axis.
  • $t_y$ is the translation distance along the y-axis.

Applying the Translation 🚀

To translate a point $(x, y)$ by $(t_x, t_y)$, you multiply the translation matrix by the homogeneous coordinate of the point:


$$\begin{bmatrix}
1 & 0 & t_x \\
0 & 1 & t_y \\
0 & 0 & 1
\end{bmatrix} \begin{bmatrix}
x \\
y \\
1
\end{bmatrix} = \begin{bmatrix}
x + t_x \\
y + t_y \\
1
\end{bmatrix}$$

The resulting point is $(x + t_x, y + t_y)$, which is the original point translated by $t_x$ and $t_y$.

Example 💡

Let's translate the point $(2, 3)$ by $(4, -1)$. The translation matrix is:


$$\begin{bmatrix}
1 & 0 & 4 \\
0 & 1 & -1 \\
0 & 0 & 1
\end{bmatrix}$$

Multiply the translation matrix by the point's homogeneous coordinates:


$$\begin{bmatrix}
1 & 0 & 4 \\
0 & 1 & -1 \\
0 & 0 & 1
\end{bmatrix} \begin{bmatrix}
2 \\
3 \\
1
\end{bmatrix} = \begin{bmatrix}
2 + 4 \\
3 - 1 \\
1
\end{bmatrix} = \begin{bmatrix}
6 \\
2 \\
1
\end{bmatrix}$$

The translated point is $(6, 2)$.

Translating Multiple Points 🎯

To translate multiple points of a shape, you apply the same translation matrix to each point individually. This will move the entire shape by the specified translation vector.

Summary 📝

  • Use homogeneous coordinates $(x, y, 1)$ to represent points.
  • Construct the translation matrix with $t_x$ and $t_y$ values.
  • Multiply the translation matrix by each point's homogeneous coordinates to get the translated points.

Using matrices for translations provides a structured and efficient way to perform geometric transformations, especially useful in computer graphics and robotics.

Know the answer? Login to help.