1. Find the standard matrix of a linear transformation from R3 to R2 which takes (1,2,3) to (1,2), (2,0,1) to (2,0), and (1,2,4) to (1,1).

If we define the standard matrix as
A = [ a b c ]
[ d e f ]

We know that Av = b, so if we plug these three pairs of vectors into this equation, we get the following system of equations:
 a + 2b + 3c = 1
2a +   +   c = 2
 a + 2b + 4c = 1
 d + 2e + 3f = 2
2d      +  f = 0
 d + 2e + 4f = 1

We can solve for a,b,c,d,e, and f to find the entries of the standard matrix.

Solving for a,b, and c with the augmented matrix:

> A:=matrix([[1,2,3,1],[2,0,1,2],[1,2,4,1]]);
A := [ 1 2 3 1 ]
[ 2 0 1 2 ]
[ 1 2 4 1 ]

> gaussjord(A);
[ 1 0 0 1 ]
[ 0 1 0 0 ]
[ 0 0 1 0 ]

Solving for d,e,and f with the augmented matrix:

> B:=matrix([[1,2,3,2],[2,0,1,0],[1,2,4,1]]);
B := [ 1 2 3 2 ]
[ 2 0 1 0 ]
[ 1 2 4 1 ]

> gaussjord(B);
[ 1 0 0 1/2 ]
[ 0 1 0 9/4 ]
[ 0 0 1 -1 ]

So the standard matrix is:

> C:=matrix([[1,0,0],[1/2,9/4,-1]]);
C := [ 1 0 0 ]
[ 1/2 9/4 -1 ]

To check that our standard matrix is correct, we multiply the standard matrix by the vector in R3 and we should get the vector in R2

> d:=matrix([[1],[2],[3]]);
d := [ 1 ]
[ 2 ]
[ 3 ]

> evalm(C&*d);
[ 1 ]
[ 2 ]

> d:=matrix([[2],[0],[1]]);
d := [ 2 ]
[ 0 ]
[ 1 ]

> evalm(C&*d);
[ 2 ]
[ 0 ]

> d:=matrix([[1],[2],[4]]);
d := [ 1 ]
[ 2 ]
[ 4 ]

> evalm(C&*d);
[ 1 ]
[ 1 ]

Our standard matrix is correct. 2. Find the standard matrix of a linear operator in R2 which is the composition of the rotation counterclockwise through angle Pi/3, the reflection about the axis y=5x and the projection on the line y=-2x.

From the webnotes, the general standard matrix for: rotation through an angle Theta is given by

> X:=matrix([[cos(theta),-sin(theta)],[sin(theta),cos(theta)]]);
X := [ cos(Theta) - sin(Theta) ]
[ sin(Theta) cos(Theta) ]

reflection about an axis is given by

> Y:=matrix([[(1-k^2)/(1+k^2), (2*k)/(1+k^2)],[(2*k)/(1+k^2),(k^2-1)/(1+k^2)]]);

                                [       2            ]
                                [  1 - k         k   ]
                                [  ------   2 ------ ]
                                [       2          2 ]
                                [  1 + k      1 + k  ]
                           Y := [                    ]
                                [             2      ]
                                [      k     k  - 1  ]
                                [ 2 ------   ------  ]
                                [        2        2  ]
                                [   1 + k    1 + k   ]

projection on a line is given by

> Z:=matrix([[1/(k^2+1), k/(k^2+1)],[k/(k^2+1),k^2/(k^2+1)]]);

                                  [    1       k   ]
                                  [ ------  ------ ]
                                  [      2       2 ]
                                  [ 1 + k   1 + k  ]
                                  [                ]
                             Z := [            2   ]
                                  [    k      k    ]
                                  [ ------  ------ ]
                                  [      2       2 ]
                                  [ 1 + k   1 + k  ]

Substituting Pi/3 for theta in the rotation standard matrix, 5 for k in the reflection standard matrix, and -2 for k in the projection standard matrix:

> x:=matrix([[cos(Pi/3),-sin(Pi/3)],[sin(Pi/3),cos(Pi/3)]]);
x := [ 1/2 -1/2*31/2 ]
[ 1/2*31/2 1/2 ]

> y:=matrix([[(1-5^2)/(1+5^2), (2*5)/(1+5^2)],[(2*5)/(1+5^2),(5^2-1)/(1+5^2)]]);
y := [ -12/13 5/13 ]
[ 5/13 12/13 ]

> z:=matrix([[1/(-2^2+1), -2/(-2^2+1)],[-2/(-2^2+1),-2^2/(-2^2+1)]]);
2 := [ -13 2/3 ]
[ 2/3 4/3 ]

From the text, multiplying matrices is equivalent to composing the corresponding linear transformations in the right-to-left order of the factors. So the standard matrix for our composition is:

> evalm(z&*y&*x);
[ (11/39) + (19/78)*31/2 (-11/39)*31/2 + (19/78) ]
[ (-2/39) + (29/39)*31/2 (2/39)*31/2 + (29/39) ]