What transformation matrix can be used to move a triangle?

626 Views Asked by At

matrix transformation

In image there is a triangle on a coordinate plane. Coordinates of a triangle are A(1, 2), B(1, 0) and C(3, 0)

If I represent all three coordinates in a 3x3 matrix, it will look like below:

\begin{bmatrix}1&1&3\\2&0&0\end{bmatrix}

Now I want to translate this triangle to new triangle whose coordinates will be A'(3,2), B'(3,0) and C'(5,0). And my new 3x3 matrix will look like below:

\begin{bmatrix}3&3&5\\2&0&0\end{bmatrix}

I know this transformation can be done using matrix multiplication. But I don't know with what transformation matrix I should multiply? And How to write transformation Matrix for this type of transformation?

Thank you

2

There are 2 best solutions below

3
On

You can only compute rotations and symmetries by using 2x2 matrix multiplication (i.e. linear transformations from $\Bbb R^2$ to $\Bbb R^2$), not translations. To obtain the second triangle you'll just need to translate by $\vec v=(2,0)^T$.

10
On

Take the original vectors $\begin{bmatrix}1&1&3\\2&0&0\end{bmatrix}$ and "augment" by adding a new "z" coordinate with the value $1$: $\begin{bmatrix}1&1&3\\2&0&0\\1&1&1\end{bmatrix}$. Now you can write the $\begin{bmatrix} 2\\0\end{bmatrix}$ translation as $\begin{bmatrix}1&0&2\\0&1&0\\0&0&1 \end{bmatrix}$ and the effect of the translation on the vectors is $\begin{bmatrix}1&0&2\\0&1&0\\0&0&1 \end{bmatrix}\begin{bmatrix}1&1&3\\2&0&0\\1&1&1\end{bmatrix}$.

Note that after the matrix multiplication, the "z" coordinate remains $1$.