◼
  • Vector Transformations and Eigenvectors of 2*2 Matrix
  • ◼
  • This entire manipulate module with notebook code is available from Wolfram Demonstrations Project at https://demonstrations.wolfram.com/VectorTransformationsAndEigenvectorsOf22Matrix/
  • ◼
  • Just run the manipulate cell and then make your changes to the module panel output without adjusting any code.
  • In[]:=
    Manipulate[Module[{A,x,result},​​A=Function[t,ToExpression[{{aa,bb},{cc,dd}}]][t];​​x=Function[t,ToExpression[{x1,x2}]][t];​​result=A.x;​​Text@Column[{​​Framed[Labeled[Row[{MatrixForm[{StringForm["(``×``)+(``×``)",Style[aa,FontColorRed],Style[x1,FontColorBlue],Style[bb,FontColorBrown],Style[x2,FontColorPurple]],StringForm["(``×``)+(``×``)",Style[cc,FontColorOrange],Style[x1,FontColorBlue],Style[dd,FontColorGreen],Style[x2,FontColorPurple]]}]," = ",MatrixForm[{{aa,bb},{cc,dd}}.{x1,x2}]}],Row[{"matrix vector product ",Style["A·x",Italic]," = ",Style["b",Italic]}],Top]],Framed[Labeled[MatrixForm[StringForm["(``×``)-(``×``)",Style[aa,FontColorRed],Style[dd,FontColorGreen],Style[bb,FontColorBrown],Style[cc,FontColorOrange]]],Row[{"determinant ",Style["A",Italic]," calculation"}],Top]],Framed[Labeled[(StringForm["(1/((``×``)-(``×``)))",Style[aa,FontColorRed],Style[dd,FontColorGreen],Style[bb,FontColorBrown],Style[cc,FontColorOrange]])×MatrixForm[{{StringForm["``",Style[dd,FontColorGreen]],StringForm["``",Style[-bb,FontColorBrown]]},{StringForm["``",Style[-cc,FontColorOrange]],StringForm["``",Style[aa,FontColorRed]]}}],Row[{"inverse ",Style["A",Italic]," calculation"}],Top]],Framed[TableForm[Table[{Eigensystem[A][[1,n]],MatrixForm[Eigensystem[A][[2,n]]]},{n,1,Length[Eigensystem[A][[1]]]}],TableHeadings{None,{"eigenvalue λ",Row[{"eigenvector ",Style["y",Italic]}]}}]],​​Row[{"matrix ",Style["A",Italic]," moves black vector ",Style["x",Italic]," to ",Style["b",Italic]}],​​Graphics[{{Black,Arrowheads[.05],Thick,Arrow[{{0,0},x}]},{color,Arrowheads[.05],Thick,Arrow[{{0,0},result}]}},AxesTrue,GridLinesAutomatic,ImageSize{200,200},AspectRatio1]},ItemSize{30,Automatic}]],​​Row[{"matrix ",Style["A",Italic]," = ",TraditionalForm[MatrixForm[{{a,b},{c,d}}]]," = ",Dynamic[MatrixForm[{{aa,bb},{cc,dd}}]]}],​​Grid[{​​{Control@{{aa,1,Style["a",Italic]},-20,20,1,ImageSizeTiny},Control@{{bb,2,Style["b",Italic]},-20,20,1,ImageSizeTiny}},{Control@{{cc,4,Style["c",Italic]},-20,20,1,ImageSizeTiny},Control@{{dd,7,Style["d",Italic]},-20,20,1,ImageSizeTiny}}}],​​"",​​Row[{"vector ",Style["x",Italic]," = ",TraditionalForm[MatrixForm[{{j},{k}}]]," = ",Dynamic[MatrixForm[{{x1},{x2}}]]}],​​{{x1,5,Style["j",Italic]},-20,20,1,ImageSizeTiny},​​{{x2,6,Style["k",Italic]},-20,20,1,ImageSizeTiny},​​"",​​{{color,Red},Red},​​"",​​Row[{"determinant ",Style["A",Italic]," = ",Dynamic[Det[{{aa,bb},{cc,dd}}]]}],​​"",​​Row[{"inverse ",Style["A",Italic]," = ",Dynamic[If[Det[{{aa,bb},{cc,dd}}]≠0,MatrixForm[Inverse[{{aa,bb},{cc,dd}}]],"This matrix is not invertible."]]}],​​"",​​"first eigenvalue × first eigenvector",​​Row[{Subscript["λ","1"],"×",Subscript[Style["y",Italic],"1"]," = ",Dynamic[MatrixForm[Eigensystem[{{aa,bb},{cc,dd}}][[1,1]]×Eigensystem[{{aa,bb},{cc,dd}}][[2,1]]]]}],​​"",​​"second eigenvalue × second eigenvector",​​Row[{Subscript["λ","2"],"×",Subscript[Style["y",Italic],"2"]," = ",Dynamic[MatrixForm[Eigensystem[{{aa,bb},{cc,dd}}][[1,2]]×Eigensystem[{{aa,bb},{cc,dd}}][[2,2]]]]}],​​ControlPlacementLeft]
    Out[]=
    ​
    matrix A =
    a
    b
    c
    d
    =
    
    1
    2
    4
    8
    
    a
    b
    c
    d
    vector x =
    j
    k
    =
    
    1
    4
    
    j
    k
    color
    determinant A =
    0
    inverse A =
    This matrix is not invertible.
    first eigenvalue × first eigenvector
    λ
    1
    ×
    y
    1
    =
    9
    36
    second eigenvalue × second eigenvector
    λ
    2
    ×
    y
    2
    =
    0
    0
    matrix vector product A·x = b
    (​1×1​)+(​2×4​)
    (​4×1​)+(​8×4​)
    =
    9
    36
    determinant A calculation
    (​1×8​)-(​2×4​)
    inverse A calculation
    
    8
    -2
    -4
    1
    (1/(​(​1×8​)-(​2×4​)​)​)
    eigenvalue λ
    eigenvector y
    9
    
    1
    4
    
    0
    
    -2
    1
    
    matrix A moves black vector x to b