Finding a transformation matrix Please can you help me with the following problem:
I have a rectangle with center $(x_1,y_1)$ and sides $a,b$ where side $a$ is parallel to axis $Ox$. I want to find a transformation matrix that:
a) converts this rectangle into a square with the same center and side $d$.
b) reflects the rectangle with mirror axis the line $y=sx+c$.
thanks in advance
 A: You must consider two linearly independent  points of this rectangle (corner or edge or middle) and investigate these point go to what points of square.
Then you can find your linear transformation.
For example for  part $a$ :
you must consider $4$ cases:
A) center do not lay on any axis 
B) center lay on X axis 
C) center lay on Y axis
D) center be $(0,0)$
and for each solve problem
Hint : you have two independent points as basis (rectangular) and T's values (that they are corresponding points on square).
A: Extended Hint: 
In order to transform the rectangle to a square you need to stretch one pair or both pairs of parallel sides to length $d$. To do this you can assume that the sides of the rectangle are parallel to the co-rodinate axis with the origin at the centre of the rectangle, because we can just pick our axis to satisfy this. Next you want to find some matrix that stretches the sides of the rectangle appropriately, to do this you should consider how you want the matrix to transform the direction vectors of the sides of your rectangle, in this case $(1,0)$ $(0,1)$ since we chose our axis judiciously in the beginning.
For the reflection, you can consider how two points on the rectangle move under this transformation and then from this you can work out the matrix which you want.
Lastly, if you want to do one trnasformation and then the other, you should left multiply the first transformation matrix by the second. Hope this helps.
