Rotations in the plane

R:matrix([u[1],-u[2]],[u[2],u[1]]);
R2:matrix([u[1],u[2]],[-u[2],u[1]]);
R2.R;

Projection to a line in the plane

P:matrix([1,0],[0,0]);
P.matrix([x],[y]);
P2:R.P.R2;

P2.P2;

Reflection with respect to a line in the plane

P:matrix([1,0],[0,-1]);
P.matrix([x],[y]);
P2:R.P.R2;

P2.P2$ratsimp(%);