# Find and draw the image of the triangle with vertices (2,1), (1, 2), (2,2)

a) Find the standard matrix of the linear transformation $T$, if $T:R^2 \rightarrow R^2$ reflects points through the line $y=x$ and then rotates points counterclockwise through π/4 radians.

b) Find and draw the image of the triangle with vertices (2,1), (1, 2), (2,2)

I think I can do the transformation, but I get confused easily by terminology. Do I literally just draw a triangle given the points, or is their more to it? If so, how do I solve b?

What is the answer to a? I would like to compare answers. I'm getting [[0, sin(π/4)][-sin(π/4), 0]].

-
Find where the points go and draw the lines in. It is that easy. This can be understood, perhaps, by the fact that linear transformations are affine transformations so the lines are always preserved. – user45150 Dec 10 '12 at 0:45
You have to work out where $(1,0)$ and $(0,1)$ go. Reflecting through $y=x$ takes $(1,0)$ to $(0,1)$, then rotating clockwise brings it to $(\sqrt2/2,\sqrt2/2)$. – Gerry Myerson Dec 10 '12 at 6:35
@LearningPython Your answer is wrong. Try again. Reflection and rotation do not change the lengths of a vector. Yet, with your transformation, the unit vector $(1,0)^T$ will go to $(0,-\sin\pi/4)^T$, which is not of unit length. – user1551 Dec 10 '12 at 9:20
@user1551 Please consider converting your comment into an answer, so that this question gets removed from the unanswered tab. If you do so, it is helpful to post it to this chat room to make people aware of it (and attract some upvotes). For further reading upon the issue of too many unanswered questions, see here, here or here. – Julian Kuelshammer Sep 17 '13 at 20:14
@Julian, I have posted an answer. Sorry, I don't do chat. – Gerry Myerson Sep 18 '13 at 5:33

$(1,0)$, reflected in $y=x$, becomes $(0,1)$; then rotating ccl through $\pi/4$ takes $(0,1)$ to $v=(-\sqrt2/2,\sqrt2/2)$.
$(0,1)$ reflects to $(1,0)$, which rotates to $w=(\sqrt2/2,\sqrt2/2)$.
The matrix we are looking for is the one whose columns are $v$ and $w$, that is, $$A=\pmatrix{-\sqrt2/2&\sqrt2/2\cr\sqrt2/2&\sqrt2/2\cr}$$
The image of the triangle with vertices $r=(2,1)$, $s=(1,2)$, and $t=(2,2)$ is the triangle whose vertices are $Ar$, $As$, and $At$. We leave it to the reader to carry out the multiplications.