Geometric Matrix Multiplication

Initialization

Off[General::spell1]

$TextStyle={FontFamily->"Courier-Bold", FontSize -> 18};

TwoDLinearTransform[M_]:= 
TwoDLinearTransform[M, {{-2.2,2.2},{-2.2,2.2}}, 10]

TwoDLinearTransform[M_, plotrange_]:= 
TwoDLinearTransform[M, plotrange, 10]

TwoDLinearTransform[M_,plotrange_,numlines_]:=Module[{hpairs,vpairs,hlines,vlines,Mhlines,Mvlines,k,domain,range},hpairs=Table[{{0.`,k},{1.`,k}},{k,0,1,((1.`)/numlines)}];vpairs=Table[{{k,0.`},{k,1.`}},{k,0,1,((1.`)/numlines)}];hlines={RGBColor[0,0,1],Thickness[0.006`],Line/@hpairs};vlines={RGBColor[1,0,0],Thickness[0.006`],Line/@vpairs};domain=Show[Graphics[hlines],Graphics[vlines],AspectRatio->Automatic,PlotRange->plotrange,Axes->True,Ticks->{Range[Ceiling[plotrange[[1,1]]],Floor[plotrange[[1,2]]]],Range[Ceiling[plotrange[[2,1]]],Floor[plotrange[[2,2]]]]},DisplayFunction->Identity];Mhlines={RGBColor[0,0,1],Thickness[0.006`],Line/@({M.#1[[1]],M.#1[[2]]}&)/@hpairs};Mvlines={RGBColor[1,0,0],Thickness[0.006`],Line/@({M.#1[[1]],M.#1[[2]]}&)/@vpairs};range=Show[Graphics[Mhlines],Graphics[Mvlines],AspectRatio->Automatic,PlotRange->plotrange,Axes->True,Ticks->{Range[Ceiling[plotrange[[1,1]]],Floor[plotrange[[1,2]]]],Range[Ceiling[plotrange[[2,1]]],Floor[plotrange[[2,2]]]]},DisplayFunction->Identity];Show[GraphicsRow[{domain,range}],DisplayFunction->$DisplayFunction,ImageSize->{640,480}]]

Transformation A (rotation by (45^∘))

A = (1/2){{Sqrt[2],-Sqrt[2]},{Sqrt[2],Sqrt[2]}};
MatrixForm[A]

TwoDLinearTransform[A,{{-2.2,2.2},{-2.2,2.2}},5]

Transformation B

B = {{2,1},{1,1}};
MatrixForm[B]

TwoDLinearTransform[B, {{-3.2,3.2},{-3.2,3.2}},5]

Transformation A∘B

MatrixForm[Simplify[A.B]]

TwoDLinearTransform[A.B, {{-0.2,4.2},{-0.2,4.2}},5]