# Can a triangle be represented as a matrix?

How would you respresent it as a matrix?; getting confused with matrices and matrix transformations, and vectors

Question which is confusing me:

Triangle1 (1, 1), (1, 2), (3, 1) Triangle2 (1, 3), (1, 6), (3, 3)

Find the matrix which represents the stretch that maps triangle T1 onto triangle T2.

The answer is a 2x2 matrix but I thought you couldn't multiply a 3x2 with a 2x2

• it is helpful if you can explain what is it that is confusing you. be a little bit more verbose.
– abel
Feb 5, 2015 at 17:16
• Matrix transformation in general confuses, what function/purpose does a transformation have? How does it transform a triangle for example? Do you not multiply both matrices to get the transformation :S regards Feb 5, 2015 at 17:19
• Yes, you can put the coordinates of the vertices as columns of the matrix. Even more, if you have the matrix of a linear transformation and multiply, from the left, the matrix of the triangle by the matrix of the transformation, you get the matrix of the transformed triangle.
– Pp..
Feb 5, 2015 at 17:20
• matrices represent some of the simplest transformation like stretching, shear, rotation and reflection to name a few. you distort shapes using matrices. what is it you are trying to do. state the problem that you are trying to solve.
– abel
Feb 5, 2015 at 17:23
• I added the question which is confusing me Feb 5, 2015 at 17:35

For a matrix multiplication to be possible the columns of the first matrix must be equal to the rows of the second matrix. As the transformation matrix has 2 columns and the matrix $T_1$ has 2 rows then multiplication is possible.

In this example we need to find a matrix $M$ such that $$MT_1=T_2$$

If we let $$M=\begin{pmatrix} a& b\\ c& d \end{pmatrix}$$

Then we have to find $a,b,c,d$ such that: $$\begin{pmatrix} a & b\\ c & d \end{pmatrix} \begin{pmatrix} 1&1&3 \\ 1& 2&1\\ \end{pmatrix}=\begin{pmatrix} 1&1&3 \\ 3&6&3 \\ \end{pmatrix}$$

Which implies: $$\begin{pmatrix} a+b&a+2b&3a+b \\ c+d&c+2d&3c+d \\ \end{pmatrix}=\begin{pmatrix} 1&1&3 \\ 3&6&3 \\ \end{pmatrix}$$

You should then be able to find $a,b,c,d$

You can check if you have the right transformation matrix by working out the area of the two triangles (they are both right angled so it's easy). The determinant of your transformation matrix should be the factor by which the area has increased/decreased.

A $2 \times 2$ matrix is a function from $\mathbb{R}^{2}$ to $\mathbb{R}^{2}$. So it takes each point on the triangle to another point in the plane. So you're not representing a triangle as a matrix. The triangle is a collection of points (i.e. elements of $\mathbb{R}^{2}$); each point gets sent to another (not necessarily different) point by the matrix. You need to find a matrix that sends all the points on the first triangle to the points on the second.