Practical Linear Algebra: A Geometry Toolbox, Third edition
Gerald Farin & Dianne Hansford
CRC Press, Taylor & Francis Group, An A K Peters Book, 2013

Linear Maps and the Action Ellipse

Linear combinations are also written in matrix form:

	c = sa + tb = s(({{v}, {w}})) + t(({{x}, {y}})) = (({{sv + tx}, {sw+ty}}))
		=(({{v, x}, {w, y}}))(({{s}, {t}}))
		
where (({{v, x}, {w, y}})) is a matrix M, and (({{s}, {t}})) is a vector v, abbreviated:

		c = Mv.
		
The action of M is called a linear map. Notationally,  we do not distiguish between a matrix and the corresponding linear map. 

Examples:
If x=w=0, M is a scaling matrix.

 If 

	M=(({{cos α, -sin α}, {sin α, cos α}})),
	
M defines a rotation by α.

In the following cell, an input vector a is in green, its image b under the matrix mat is in red. The vector a traces out a circle, and b traces out an ellipse -- the action ellipse.

(* matrix options: load one into mat *)
mat1 = {{3,1},{1,2}};
mat2 = {{-3,1},{1,2}};
angle = Pi/4;
mat3 = {{Cos[angle],-Sin[angle]},{Sin[angle],Cos[angle]}};
mat4 = {{3,0},{0,1}};
mat5 = {{3,0},{0,0}};

mat = mat1;

(* a is in green, tracing out a circle *)
(* b is in red, tracing out the action ellipse *)

Manipulate[
a={Cos[s],Sin[s]};
b = mat.a;  

arrowa={Thick,Arrowheads[Large],Arrow[{{0,0},a}]};
arrowb={Thick,Arrowheads[Large],Arrow[{{0,0},b}]};

Graphics[{Green,arrowa,Circle[],Red,arrowb},Axes->True,PlotLabel->Style[MatrixForm[mat],15],PlotRange->{{-3,3},{-2,2}}],
{{s,0,"Green vector selection"},0,2Pi},
FrameLabel->{" "," ","red vector = matrix * green vector"," "}]

All matrices map circles to ellipses.
In the following cell, the original data are green and the mapped data (images) are red. 
Original points and corresponding image points are connected by straight lines. 
This is a static version of the previous cell.

circpoints = Table[{Cos[t],Sin[t]},{t,0,2 Pi,0.1}];
ellpoints= Table[mat.{Cos[t],Sin[t]},{t,0,2Pi,0.1}];
pplot=Graphics[{PointSize[Large],Green,Point[circpoints],Red, Point[ellpoints]}];

line[t_]:=Graphics[Line[ {mat.{Cos[t],Sin[t]},{Cos[t],Sin[t]}}]];
lineplot=Table[line[t],{t,0,2Pi,0.1}];
Show[{lineplot,pplot}]