MGM.10 The Spectral Theorem for Symmetric Matrices and the Holy Grail of Matrix Theory
GIVE IT A TRY!

Needs["LinearAlgebra`MatrixManipulation`"];
Needs["LinearAlgebra`Orthogonalization`"];
Needs["Graphics`Colors`"];
Off[General::"spell"];
Off[General::"spell1"];
Off[ParametricPlot3D::"ppcom"];
Off[ParametricPlot::"ppcom"];
Off[Plot::"plnr"];
SetOptions[Limit, Analytic -> True];
$Pre = Chop;

CMView = {2.7, 1.6, 1.2};

Vector Drawer

\(\(\( (*\ \(\(:\)\(Date : \ \ Copyright\ 2001\)\), \ 
      Math\ Everywhere, \ \(\(Inc\)\(.\)\)\ 
*) \)\(
\)\( (*
Original\ Conception\ to\ create\ a\ vector\ drawer\ is\ due\ to\ Bill\ Davis . 
Current\ code\ is\ by\ Bruce\ \(\(Carpenter\)\(.\)\)
*) \)\(
\)\( (*\ \ \(\(\(:\)\(Drawbacks : \ \ Since\ the\ vectors\ are\ drawn\ out\ of\)\)\ 

      \ \ \ \ \ context\), \ 
      the\ shapes\ of\ the\ arrowheads\ are\ only\ 
\ \ \ \ \ correct\ with\ AspectRatio\ set\ to\ \(\(Automatic\)\(.\)\)
*) \)\)\)

BeginPackage["Vector3D`","Graphics`Colors`"];

Axes3D::usage = "Axes3D[a, b] creates a Graphics3D object of cartesian axes with x, y, and z running from -a/3 to a, and with axes labels b units beyond the tips of the axes.  Axes3D[a] is Axes3D[a, a/8].";

Perpend::usage = "Perpend[a] returns a unit vector which is perpendicular to the vector a.";

Arrow::usage = "Arrow[a] produces a 2 or 3 dimensional vector from the origin to a. Arrow[a, Tail -> tail] gives a vector from tail to a.";
	
Vector::usage = "Vector[a, b] gives a 2D or 3D vector from a to b.";

ArrowHead::usage = "ArrowHead[a, vec] produces an arrowhead with its tip placed at the point a, pointing in the direction of the vector vec.";

Tail::usage = "Tail -> point puts the tail of the vector at point.";

Norm::usage = "Norm[vec] returns the Euclidean length of vec.";

Normalize::usage = "Normalize[vec] returns a unit vector in the direction of vec, provided vec is nonzero.";

Aperture::usage = "Aperture is the ratio of the radius of the base to the length of the head of a vector.";

TipSize::usage = "TipSize specifies an absolute size for the inner tip length of the head of a vector.";

TipRatio::usage = "TipRatio is the ratio of the inner length of the arrowhead to the length of the shaft of a vector.";

HeadRatio::usage = "HeadRatio is the ratio of the outer length of the arrowhead to the length of the shaft of a vector.";

HeadSize::usage = "HeadSize specifies an absolute size for the head of a vector.";

ScaleFactor::usage = "ScaleFactor specifies the amount to scale a vector in length and may be either a number or a pure function.";

ZeroVectorPointSize::usage = "ZeroVectorPointSize is the size of the point used to represent a zero vector.";

Options[Vector] = Options[Arrow] = Options[ArrowHead] =
{HeadRatio -> 0.18, TipRatio -> 0.14, Aperture -> 0.3, ScaleFactor -> 1, HeadType -> Polygon, ShaftQ -> True, EdgesQ -> True, VectorColor -> RGBColor[0,0,1], ShaftWidth -> 0.005, ZeroVectorPointSize -> 0.01};
		
Begin["`Private`"];

SetOptions[ParametricPlot,AspectRatio -> Automatic];
SetOptions[Plot,AspectRatio -> Automatic];
SetOptions[Graphics,AspectRatio -> Automatic];

Axes3D[u_,v_] := 
      Graphics3D[{
            {Blue,Line[{{-u/3,0,0},{u,0,0}}]},
                    Text["x",{u + v,0,0}],
            {Blue,Line[{{0,-u/3,0},{0,u,0}}]},
                    Text["y",{0, u + v,0}],
            {Blue,Line[{{0,0,-u/3},{0,0,u}}]},
                    Text["z",{0,0,u + v}]}]; 
Axes3D[u_] := Axes3D[u,u/8];
				
Norm[a_?VectorQ] := N[Sqrt[a.a]];

Normalize[a_?VectorQ] := If[a.a == 0, a, a/Norm[a]];

Perpend[a_?VectorQ] := Normalize[{a[[2]],-a[[1]]}]/;Length[a]==2;

Perpend[a_?VectorQ]:=
    Normalize[If[a[[1]]==0,{1,0,0},{a[[2]],-a[[1]],0}]]/;
      Length[a]==3;
      
Base3D = Table[{Cos[2 k Pi/8.], Sin[2 k Pi/8.]},{k,0,8}]; 

Vector[from_?VectorQ, to_?VectorQ, opts___] := Module[
   {sq, sw, ht, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, tip},
   {sq, sw, ht, hs, hr, ts, tr, ap, sf, vc, zvps} = {ShaftQ, ShaftWidth, HeadType, HeadSize, HeadRatio, TipSize, TipRatio, Aperture, ScaleFactor, VectorColor, ZeroVectorPointSize} /. {opts} /. Options[Vector];
   If[from==to, Return[Graphics[{PointSize[zvps],vc,Point[from]}]]];
   diff = If[NumberQ[N[sf]], sf diff, sf[diff]];
   tip = from + diff;
   If[NumberQ[hs], hr = hs/Norm[diff]; tr = 0.75 hr];
   If[NumberQ[ts], tr = ts/Norm[diff]];
   Graphics[{If[sq,{vc,Thickness[sw],Line[{from,tip - tr diff}]},{}],
      With[{trans = ap hr Norm[diff] Perpend[diff]},
      {vc, Thickness[sw], ht[{tip,
                   (tip - hr diff + trans),
                   (tip - tr diff),
                   (tip - hr diff - trans),tip}]}]}]
] /; Length[from]==Length[to]==2

Vector[from_?VectorQ, to_?VectorQ, opts___] := Module[
   {sq, eq, sw, hs, hr, tr,ap, sf, vc, zvps, diff = to - from, tip},
   {sq, eq, sw, hs, hr, ap, sf, vc, zvps} = {ShaftQ, EdgesQ, ShaftWidth, HeadSize, HeadRatio, Aperture, ScaleFactor, VectorColor, ZeroVectorPointSize} /. {opts} /. Options[Vector];
   If[from==to, Return[Graphics3D[{PointSize[zvps],vc,Point[from]}]]];
   diff = If[NumberQ[N[sf]], sf diff, sf[diff]];
   tip = from + diff;
   If[NumberQ[hs], hr = hs/Norm[diff]];
   tr = hr/2;
   Graphics3D[{If[sq,{vc,Thickness[sw],Line[{from,tip-tr diff}]},{}], If[eq, {}, EdgeForm[]], {SurfaceColor[vc],
      With[{temp = Perpend[diff]},
      Polygon[Append[#,tip]]& /@ Partition[(tip - hr diff + #)&/@((ap hr Norm[diff] Base3D) . {temp,Normalize[Cross[temp,diff]]}),2,1]]}}]
] /; Length[from]==Length[to]==3


Arrow[a_, Tail->b_, opts___] := Vector[b,a+b,opts]

Arrow[a_, opts___] := Vector[Table[0,{Length[a]}],a,opts]

ArrowHead[a_, b_, opts___] := Vector[a-b,a,ShaftQ->False,opts];

End[];

EndPackage[];
Null

Graphics`Colors`GosiaGreen = 
        RGBColor[0,  0.392187,  0];

ThreeAxes[u,v]

ThreeAxes[u_, v_] := 
        Graphics3D[{{Blue, Line[{{-u, 0, 0}, {u, 0, 0}}]}, 
            Text["x", {u + v, 0, 0}], {Blue, 
              Line[{{0, -u, 0}, {0, u, 0}}]}, 
            Text["y", {0, u + v, 0}], {Blue, 
              Line[{{0, 0, 0}, {0, 0, u}}]}, 
            Text["z", {0, 0, u + v}]}];
ThreeAxes[u_] := ThreeAxes[u, (u/8)];
ThreeAxes::"usage" = "ThreeAxes[a,b] makes a standard cartesian \
axis graphics object with x, y, and z running from -a to a, and with axis \
labels b units beyond the tips of the axes.  ThreeAxes[a] is \
ThreeAxes[a,a/8].";

Needs["Statistics`ContinuousDistributions`"];

Clear[matrixplucker];
matrixplucker[expr_, 
        vars_] := Simplify[
          Outer[D, {expr}, 
            vars]][[1]]

G.1) Symmetric matrices and the SVD

G.1.a.i) Setting the parameters

Here's a matrix with three cleared entries  r, s, t, x, y and z

Clear[r, s, t, x, y, z];
A=(({{2.1, 5., -2.3, 0.0}, {r, -4.2, 1.7, 0.9}, {s, t, 4.2, -2.7}, {x, y, z, -1.8}}));

MatrixForm[
      A]

Set r, s, t, x, y and z so that the resulting matrix is symmetric.

G.1.a.ii) Hessians are symmetric

The hessian of a function of three variables f[x,y,z] is given by

(Subscript[H, f])[x, y, z]  =  (({{Derivative[2, 0, 0][f][x, y, z], Derivative[1, 1, 0][f][x, y, z], Derivative[1, 0, 1][f][x, y, z]}, {Derivative[1, 1, 0][f][x, y, z], Derivative[0, 2, 0][f][x, y, z], Derivative[0, 1, 1][f][x, y, z]}, {Derivative[1, 0, 1][f][x, y, z], Derivative[0, 1, 1][f][x, y, z], Derivative[0, 0, 2][f][x, y, z]}}))
You make the call. 
Is this matrix symmetric?

G.1.a.iii) Symmetric matrices are square matrices

Does a matrix A that hits on 4D and hangs in 3D have any chance of being symmetric?
Why or why not?

G.1.b.i) The transpose manipulation

Here is a random matrix A:

hitdim =  Random[Integer, {2, 6}];
hangdim =  Random[Integer, {2, 9}];
Clear[i, j];
A  =  
        Table[Random[Real, {-4, 4}], {i, 1, hangdim}, {j, 1, 
            hitdim}];
MatrixForm[A]

Here's a random X in hitdimD:

X  =  Table[Random[Real, {-4, 4}], {j, 1, hitdim}]

Here's a random Y in hangdimD:

Y =  Table[Random[Real, {-4, 4}], {i, 1, hangdim}]

Here's a calculation of Y• (A . X).

Y . (A . X)

And here's a calculation of ((A^t) . Y ) •X.

(Transpose[A] . Y) . X

Say why you are not at all surprised with the outcome.

G.1.c.i) Eigenvectors of non-symmetric matrices

Here's a non-symmetric 2D matrix A shown with a plot of the unit eigenvectors of A:

A= (({{2.0, -1.2}, {Random[Real, {-0.9, -0.1}], Random[
                    Real, {-3, 3}]}}));
MatrixForm[A]

Clear[eigenvector];
{eigenvector[1], eigenvector[2]} = Eigenvectors[A];

eigenplot = 
          Table[Arrow[eigenvector[k], Tail -> {0, 0}, 
              VectorColor -> Indigo], {k, 1, 2}];

Show[eigenplot, Axes -> True, 
        AxesLabel -> {"x", "y"}, 
        PlotRange -> {{-1, 1}, {-1, 1}}, 
        PlotLabel -> "Unit eigenvectors of nonsymmetric matrix \
A"];

Here is the dot product of the wo plotted eigenvectors:

eigenvector[1] . eigenvector[2]

Does the outcome surprise you? 
Why or why not?

G.1.c.ii) Eigenvectors of symmetric matrices

Now do the same thing for a random symmetric 2D matrix A:

B=(({{Random[Real, {-3, 3}], Random[
                    Real, {-3, 3}]}, {Random[Real, {-3, 3}], Random[
                    Real, {-3, 3}]}}));
A = (1/2) (B + Transpose[B]);
MatrixForm[A]

Clear[eigenvector];
{eigenvector[1], eigenvector[2]} = Eigenvectors[A];

eigenplot = 
          Table[Arrow[eigenvector[k], Tail -> {0, 0}, 
              VectorColor -> Indigo], {k, 1, 2}];

Show[eigenplot, Axes -> True, 
        AxesLabel -> {"x", "y"}, 
        PlotRange -> {{-1, 1}, {-1, 1}}, 
        PlotLabel -> "Unit eigenvectors of random symmetric matrix \
B"];

Here is the dot product of the wo plotted eigenvectors:

eigenvector[1] . eigenvector[2]

Does the outcome surprise you? 
Why or why not?
How is the Spectral Theorem for symmetric matrices related to your response?

G.1.d.i)  SVD aligner frame from the eigenview

Here is random  2D matrix A:

A =(({{Random[Real, {-3, 3}], Random[
                    Real, {-3, 3}]}, {Random[Real, {-3, 3}], Random[
                    Real, {-3, 3}]}}));
MatrixForm[A]

Here is  (A^t) . A:

MatrixForm[Transpose[A] . A]

The matrix  (A^t) . A is automatically symmetric because
        ((((A^t) . A))^t) = (A^t) . ((((A^t)))^t)  =  (A^t) . A.
The Spectral theorem guarantees a perpendicular frame of eigenvectors of (A^t) . A.
Here they are:

Clear[eigenvector];
{eigenvector[1], eigenvector[2]}  =  
        Eigenvectors[Transpose[A] . A];
eigenplot  =  
        Table[Arrow[eigenvector[k], Tail -> {0, 0}, 
            VectorColor -> Indigo], {k, 1, 2}];
\(\(Show[eigenplot, Axes -> True, AxesLabel -> {"x", "y"}, 
\ 
        PlotRange -> {{\(-1\), 1}, {\(-1\), 1}}, 
\ 
        PlotLabel -> "Unit eigenvectors of \!\(A\^t\).A"];\)\)

How do you get an SVD aligner frame for A from these two vectors?

G.1.d.ii) SVD stretch factors and hanger frame from the eigenview

Stay with the same matrix A and use the eigenvectors you found in part i) to generate the SVD stretch factors and the corresponding SVD hanger  frame for A. Plot the hangerframe.

G.1.e) Aligner frame for A versus aligner frame for  (A^t) . A

Here's a new random  2D matrix A:

A =(({{Random[Real, {-3, 3}], Random[
                    Real, {-3, 3}]}, {Random[Real, {-3, 3}], Random[
                    Real, {-3, 3}]}}));
MatrixForm[A]

Here is  (A^t) . A:

MatrixForm[Transpose[A] . A]

Let Mathematica come up with an SVD aligner frame for A:

SingularValues[A][[3]]

Let Mathematica come up with an SVD aligner frame for (A^t) . A::

SingularValues[Transpose[A] . A][[3]]

Speculate on why these two turned out the way they did.

G.2) The Spectral Theorem is the Holy Grail of Matrix Theory

G.2.a) Using the Spectral Theorem to do SVD analysis

Here is a random matrix A

hitdim  =  Random[Integer, {3, 7}];
hangdim  =  Random[Integer, {3, 7}];
A   =  
Table[
          Random[Real, {-10, 10}], {i, 1, hangdim}, {j, 1, 
            hitdim}];
MatrixForm[A]

The Spectral theorem guarantees an orthonormal basis of hitdimD consisting of eigenvectors of (A^t) . A. Here is one such:

Clear[eigenvector];
eigenvector[k_] :=Eigenvectors[Transpose[A] . A][[k]];
Table[
      eigenvector[k], {k, 1 , 
        Length[Eigenvectors[Transpose[A] . A]]}]

▪ Use these eigenvectors of (A^t) . A to come up with an SVD aligner frame for A.
Put answer here.

▪ Hit A on your aligner frame vectors to come up with the SVD stretch factors for A.
Put answer here.

▪ Hit A on your aligner frame vectors to come up with the SVD hangerframe corresponding to the aligner frame you came up with earlier.
Put answer here.

G.2.b) Rank, orthonormal bases of null space, column space and row space

Here is a random matrix A

hitdim  =  Random[Integer, {5, 8}];
hangdim  =  Random[Integer, {2, 4}];
A  =  
        Table[Random[Real, {-10, 10}], {i, 1, hangdim}, {j, 1, 
            hitdim}];
MatrixForm[A]

Here is a look at (A^t) . A:

MatrixForm[Transpose[A] . A]

The Spectral theorem guarantees an orthonormal basis of hitdimD consisting of eigenvectors of (A^t) . A. Here is one such:

Clear[eigenvector];
eigenvector[k_] :=Eigenvectors[Transpose[A] . A][[k]];
Table[
      eigenvector[k], {k, 1 , 
        Length[Eigenvectors[Transpose[A] . A]]}]

Now hit each of these eigenvectors with A:

Table[A.eigenvector[k],{k, 1 , Length[Eigenvectors[Transpose[A] . A]]}]

Use the information above to come up with quick calculations of:
▪ The rank of A.
Put answer here.

▪ An orthonormal basis the row space of A and the dimension of the row space of A.
 Put answer here.

▪ An orthonormal basis of the null space of A and the dimension of the null space of A.
 Put answer here.

▪ An orthonormal basis of the column space of A and the dimension of the column space of A.
 Put answer here.

▪ PseudoInverse[A].Y for any Y in hangdimD.

G.2.c)  Facts about dimensions

Given a matrix A hitting on hitdimD and hanging in hangdim D, you already know that (A^t) . A is a symmetric matrix which hits on hitdimD and hangs in hitdimD.

The Spectral theorem gives you an orthonormal basis {(Subscript[X, 1]),(Subscript[X, 2]),(Subscript[X, 3]), (Subscript[X, 4]),....,(Subscript[X, hitdim])} of hitdimD consisting of unit eigenvectors of (A^t) . A. Group and (if necessary relabel)  these vectors into two groups.
        
Group I = {(Subscript[X, 1]),(Subscript[X, 2]),(Subscript[X, 3]),....,(Subscript[X, p])} for which A.(Subscript[X, j]) ≠ {0,0,...0} for all j = 1,2,...,p.

Group 2 = {(Subscript[X, p + 1]),(Subscript[X, p + 2]),(Subscript[X, p + 3]),....,(Subscript[X, hitdim])} for which A.(Subscript[X, j]) = {0,0,...} for all j = p+1,p+2, ...,hitdimD.

The facts of the matter are:
 ▪ The rank of A is p.
▪  To get an orthonormal basis of the column space R[A], you just go with   
             {A . ((Subscript[X, 1])/(||A . (Subscript[X, 1])||)),  
      A . ((Subscript[X, 2])/(||A . (Subscript[X, 2])||)), 
      A . ((Subscript[X, 3])/(||A . (Subscript[X, 3])||)),  ... , 
      A . ((Subscript[X, p])/(||A . (Subscript[X, p])||))}.

▪ To get an orthonormal basis of the row space R[(A^t)], you just go with  {(Subscript[X, 1]),(Subscript[X, 2]),(Subscript[X, 3]),....,(Subscript[X, p])}.

▪ To get an orthonormal basis of N[A], you just go with  {(Subscript[X, p + 1]),(Subscript[X, p + 2]),(Subscript[X, 3]),....,(Subscript[X, hitdim])}.

Given this:
◼ What is the dimension of the column space R[A]?
Put answer here,

◼ What is the dimension of the row space  R[(A^t)]?
Put answer here,

◼ What is the dimension of the null space  N[A]?
Put answer here,

◼ When you add     (dimension of R[A]) + (dimension of N[A]) , what do you get?
Put answer here,

G.3) How SVD stretch factors of A are related to eigenvalues of  (A^t) . A

G.3.a.i) How SVD stretch factors of A are related to eigenvalues of  (A^t) . A

Here's a random 2D matrix:

A = (({{Random[Real, {-3, 3}], Random[
                    Real, {-3, 3}]}, {Random[Real, {-3, 3}], Random[
                    Real, {-3, 3}]}}));
MatrixForm[
      A]

The SVD stretch factors of A are:

stretches = SingularValues[A][[2]]

Compare with the square roots of the eigenvalues of (A^t) . A

f[x_] = (Sqrt[x]);
Map[f, 
      Eigenvalues[Transpose[A] . A]]

Try the same thing for other random matrices:

hitdim  =  Random[Integer, {3, 7}];
hangdim  =  Random[Integer, {3, 7}];
A  =  
        Table[Random[Real, {-10, 10}], {i, 1, hangdim}, {j, 1, 
            hitdim}];
MatrixForm[A]

The SVD stretch factors of A are:

stretches = SingularValues[A][[2]]

Compare with the square roots of the eigenvalues of (A^t) . A

f[x_] = (Sqrt[x]);
Map[f, 
      Eigenvalues[Transpose[A] . A]]

The strong suggestion is that the SVD stretch factors of any matrix A are the square roots of the eigenvalues of (A^t) . A. Explain why this is guaranteed for any matrix A.

For any matrix A, the Spectral theorem gives you an orthonormal basis 
           {(Subscript[X, 1]),(Subscript[X, 2]),(Subscript[X, 3]), (Subscript[X, 4]),....,(Subscript[X, hitdim])} 
of hitdimD consisting of unit eigenvectors of (A^t) . A.

Group and (if necessary relabel) these vectors into two groups:
        
Group I = {(Subscript[X, 1]),(Subscript[X, 2]),(Subscript[X, 3]),....,(Subscript[X, p])} for which A.(Subscript[X, j]) ≠ {0,0,...0} for all j = 1,2,...,p.

Group 2 = {(Subscript[X, p]),(Subscript[X, p + 2]),(Subscript[X, p + 3]),....,(Subscript[X, hitdim])} for which A.(Subscript[X, j]) = {0,0,...} 
      for all j = p+1,p+2, ...,hitdimD.
      
Facts of the matter:
▪ An SVD alignerframe for A,
          {alignerframe[1],alignerframe[2],.alignerframe[3], . .,alignerframe[p]}
 is 
            {(Subscript[X, 1]),(Subscript[X, 2]),(Subscript[X, 3]),....,(Subscript[X, p])}.

▪ The corresponding nonzero SVD stretch factors  for A,
         {stretch[1],stretch[2],stretch[3],....,stretch[p]}, 
are
         {||A . (Subscript[X, 1])||,||A . (Subscript[X, 2])||,||A . (Subscript[X, 3])||,....,||A . (Subscript[X, p])||}.

So  stretch[k] = ||A . (Subscript[X, k])|| = (Sqrt[A.(Subscript[X, k]). A.(Subscript[X, k])]) = (Sqrt[(Subscript[X, k]).(A^t)A . (Subscript[X, k])])

G.3.a.ii) The stretch factors of  (A^t) . A  are the eigenvalues of (A^t) . A

Here's a random matrix A:

hitdim  =  Random[Integer, {3, 7}];
hangdim  =  Random[Integer, {2, 4}];
A  =  
        Table[Random[Real, {-4, 4}], {i, 1, hangdim}, {j, 1, 
            hitdim}];
MatrixForm[A]

Here is a look at (A^t) . A:

MatrixForm[Transpose[A] . A]

Here are the non-zero SVD stretch factors of (A^t) . A

stretches = SingularValues[Transpose[A] . A][[2]]

Here are the eigenvalues of (A^t) . A

eigenvalues  =  Eigenvalues[Transpose[A] . A]

Try it again for another random matrix A:

hitdim  =  Random[Integer, {3, 7}];
hangdim  =  Random[Integer, {2, 4}];
A  =  
        Table[Random[Real, {-4, 4}], {i, 1, hangdim}, {j, 1, 
            hitdim}];
MatrixForm[A]

Here are the non-zero SVD stretch factors of (A^t) . A

stretches = SingularValues[Transpose[A] . A][[2]]

Here are the eigenvalues of (A^t) . A

eigenvalues  =  Eigenvalues[Transpose[A] . A]

Why did that happen?

G.3.a.iii) The condition  number of A in terms of the condition number of (A^t) . A

Given any matrix A, you can express the condition number of A in terms of the condition number of (A^t) . A.
Do it.
If A is ill-conditioned, do you think that  (A^t) . A even more ill-conditioned?
Why?

G.4) The guts of Spectral Theorem

G.4.a) Importance of Spectral Theorem

All through the basics, there was lots of raving about the importance of the Spectral Theorem.
What does the Spectral Theorem say and why is it so important?

G.4.b) Guts of the proof of the Spectral Theorem

Here's a random symmetric 2D matrix A:

Clear[i, j];
B = 
        Table[Random[Real, {-4, 4}], {i, 1, 2}, {j, 1, 2}];
A = (1/2) (B + Transpose[B]);
MatrixForm[A]

Make this function:

Clear[g, x, y];
\(g[x_, y_] = 
      Expand[{x, y} . \((A . {x, y})\)\/{x, y} . {x, y}]\)

Look at this graphic:

glevels = 
        DensityPlot[Evaluate[g[x, y]], {x, -1, 1}, {y, -1, 1}, 
          Axes -> True, AxesLabel -> {"x", "y"}, 
          PlotPoints -> 50];

Throw in the unit eigenvectors of A:

Clear[eigenvector];
{eigenvector[1], eigenvector[2]} = Eigenvectors[A];
eigenplot = 
        Table[Arrow[eigenvector[k], Tail -> {0, 0}, 
            VectorColor -> Red], {k, 1, 2}];
Show[glevels, eigenplot];

Here's another:

Clear[i, j];
B = 
        Table[Random[Real, {-4, 4}], {i, 1, 2}, {j, 1, 2}];
A = (1/2) (B + Transpose[B]);
MatrixForm[A]
Clear[g, x, y];
\(\(g[x_, y_] = 
        Expand[{x, y} . \((A . {x, y})\)\/{x, y} . {x, y}];\)\)
glevels = 
        DensityPlot[Evaluate[g[x, y]], {x, -1, 1}, {y, -1, 1}, 
          Axes -> True, AxesLabel -> {"x", "y"}, 
          PlotPoints -> 50, 
          DisplayFunction -> Identity];
Clear[eigenvector];
{eigenvector[1], eigenvector[2]} = Eigenvectors[A];
eigenplot = 
        Table[Arrow[eigenvector[k], Tail -> {0, 0}, 
            VectorColor -> Red], {k, 1, 2}];
Show[glevels, eigenplot, 
        PlotLabel -> "Density plot with eigenvectors of A", 
        DisplayFunction -> $DisplayFunction];

Rerun the last cell a couple of times.
How does the proof of the Spectral theorem tell you why all these graphics turned out the way they did?

G.4.c) The eigenvalues of symmetric matrices are all real

How does the proof of the spectral theorem reveal why the eigenvalues of a symmetric matrix are all real?

G.5) Positive semidefinite and positive definite symmetric matrices

G.5.a.i) The square root of a positive semidefinite matrix

If someone hands you a symmetric matrix A with all nonnegative eigenvalues, then it's pretty easy to come up with another symmetric matrix B so that 
           B . B  =  (B^t) . B  =  A
Explain in general terms how you can do this.

G.5.a.ii) If A = (B^t).B , then all the eigenvalues of A  are non-negative

When someone hands you any matrix B and you put  A = (B^t) . B ,then the transpose manipulation
yields
            X• (A . X)  =  
        X• (((B^t) . B) . X) 
                               =  X• ((B^t).(B . X)) 
                               = (B.X)• (B . X)) = \(\(\(||\)\(B . X\)\)\( || \^2\)\). 
Because \(\(\(\(||\)\(B . X\)\)\( || \^2\)\)\) cannot be negative, this tells you
            X• (A . X)  ⩾  0 
no matter what X is.
At this point you take over and explain why all the eigenvalues of  A = (B^t) . B are non-negative

G.5.a.iii) FYI: Positive semi definite and positive definite matrices

At this point you have enough to settle on this factoid:
Saying that all the eigenvalues of a symmetric matrix A  are nonnegative the same as saying
    X• (A . X)  ⩾  0 
no matter what X is.
Most folks call these symmetric matrices by the name "positive semi-definite matrices"

It turns out that
Saying that all the eigenvalues of a symmetric matrix A  are positive the same as saying
    X• (A . X)  >  0 
unless X = {0,0,...0}
Most folks call these symmetric matrices by the name "positive definite matrices."

G.5.a.iv) Positive definite Hessians

When you go with a function f[x,y,z] and find a point {a,b,c} at which gradf[a,b,c] = 0 and you find that the Hessian (Subscript[H, f])[a, b, c] is positive definite, how does f[a,b,c] compare to f[x,y,z] when {x,y,z} is near {a,b,c}?

G.6) Hessians for function Max-Min

G.6.a) Local maximizers and local minimizers of f[x,y] = (e^(-1.8 (x^2) - 1.7 (y^2))) (x - 
              (y^2) + Sin[x y])

Here's a function f[x,y]:

Clear[f, x, y]; 
f[x_, 
        y_] = (E^(-1.8 (x^2) - 1.7 (y^2))) (x - (y^2) + 
            Sin[x y])

Here's a plot of f[x,y] in the region -2 ≤ x  ≤ 2 and -2 ≤ y ≤ 2:

{xlow, xhigh}  =  {-2, 2};
{ylow, yhigh} =  {-2, 2};
\(	\(Plot3D[f[x, y], {x, xlow, xhigh}, {y, ylow, yhigh}, 
        AxesLabel -> {"x", "y", "f[x,y]"}, Boxed -> False, 
        PlotRange -> All, ViewPoint -> CMView];\)\)

You can see a that this function has a local maximizer and possibly a couple of  local minimizers in the plotted region.

Clear[gradf];
\(	gradf[x_, 
        y_]\  = \ {∂\_x f[x, y], ∂\_y f[x, 
            y]}\)

There is no chance of solving gradf[x,y] = {0,0} with the solve command.

\(\(xderivcontourplot = 
        ContourPlot[\(gradf[x, 
              y]\)[[1]], {x, xlow, 
            xhigh}, {y, ylow, yhigh}, Contours -> {0}, 
          ContourStyle -> Thickness[0.01], PlotPoints -> 50, 
          ContourSmoothing -> Automatic, ContourShading -> False, 
          DisplayFunction -> Identity];\)
\)
\(\(yderivcontourplot = 
        ContourPlot[\(gradf[x, 
              y]\)[[2]], {x, xlow, 
            xhigh}, {y, ylow, yhigh}, Contours -> {0}, 
          ContourStyle -> Thickness[0.01], PlotPoints -> 50, 
          ContourSmoothing -> Automatic, ContourShading -> False, 
          DisplayFunction -> Identity];\)
\)
zeroderiv = 
        Show[xderivcontourplot, yderivcontourplot, 
          DisplayFunction -> $DisplayFunction];

The curves are plots of (∂_x) f[x, y]  =  0 and (∂_y) f[x, y]  =  0.
Let Mathematica come up with the points of intersection:

{x1, y1}  =  {x, y} /. 
        FindRoot[gradf[x, y]  ==  {0, 0}, {x, 0}, {y, -0.5}]

{x2, y2}  = {x, y} /.  
        FindRoot[
          gradf[x, y]  ==  {0, 0}, {x, -0.5}, {y, 0.5}]

{x3, y3}  =  {x, y} /. 
        FindRoot[gradf[x, y]  ==  {0, 0}, {x, 0.5}, {y, 0}]

See them:

\(\(pointplots\  = \ {Graphics[{Red, PointSize[0.03], 
              Point[{x1, y1}]}], 
		Graphics[{Red, PointSize[0.03], 
              Point[{x2, y2}]}], 
		Graphics[{Red, PointSize[0.03], 
              Point[{x3, y3}]}]};\)\)
Show[zeroderiv, pointplots];

Move in with the Hessian to determine what's happening at these points.

G.6.b) Local maximizers and local minimizers and saddle points of
     f[x,y] = (e^(-2 (x^2) - 3 (y^2))) (3 Sin[0.5 x]^2 - 
            (y^2))

Here's a function f[x,y]:

Clear[f, x, y]; 
f[x_, 
        y_] = (E^(-2 (x^2) - 3 (y^2))) (3 Sin[0.5 x]^2 - (y^2))

Here's a plot of f[x,y] in the region -1 ≤ x  ≤ 1 and -1 ≤ y ≤ 1:

{xlow, xhigh}  =  {-1, 1};
{ylow, yhigh} =  {-1, 1};
\(	\(Plot3D[f[x, y], {x, xlow, xhigh}, {y, ylow, yhigh}, 
        AxesLabel -> {"x", "y", "f[x,y]"}, Boxed -> False, 
        PlotRange -> All, ViewPoint -> CMView];\)\)

You can see a that this function has a local maximizers, a local minimizer and maybe a saddle point in the plotted region:
Locate the points and use the Hessian to determine which are local maximizers,which are local minimizers and which are saddle points.

G.6.c) Kicking up the dimension

Here's a function of three variables:

Clear[f, gradf, x, y, z];
f[x_, y_, z_] = 5.1 x + 6.5 y + 8.1 z + (1.3/(x y z))

You can't plot this function, but you can calculate its gradient:

gradf[x_, y_, 
        z_]  =  {(∂_x) f[x, y, z], (∂_y) f[x, y, 
            z], (∂_z) f[x, y, z]}

The hessian
(Subscript[H, f])[x, y, z] = (({{Derivative[2, 0, 0][f][x, y, z], Derivative[1, 1, 0][f][x, y, z], Derivative[1, 0, 1][f][x, y, z]}, {Derivative[1, 1, 0][f][x, y, z], Derivative[0, 2, 0][f][x, y, z], Derivative[0, 1, 1][f][x, y, z]}, {Derivative[1, 0, 1][f][x, y, z], Derivative[0, 1, 1][f][x, y, z], Derivative[0, 0, 2][f][x, y, z]}}))
is given by

(Subscript[H, f])[x_, y_, z_] =(({{\(∂\_{x, 2}f[x, y, z]\), (∂_(x, y))f[
                      x, y, z], (∂_(x, z))f[x, y, z]}, {(∂_(y, x))f[x, y, z], \(∂\_{y, 2}f[
                      x, y, z]\), (∂_(y, z))f[x, y, z]}, {(∂_(z, x))f[x, y, 
                      z], (∂_(z, y))f[x, y, 
                      z], \(∂\_{z, 2}f[x, y, z]\)}}));

MatrixForm[
      (Subscript[H, f])[x, y, z]]

Find the point {a,b,c} with a > 0, b >0 and c >0 at which
             gradf[a,b,c] = {0,0,0}.
Use the Hessian to determine whether the point {a,b,c} is a local maximizer, local minimizer or saddle point for f[x,y,z].
Here's a start:

Solve[gradf[x, y, z]  ==  {0, 0, 0}]

G.7) Quadratic forms
         f[x, y]  = a (x^2) + b x y + c (y^2) + d x + e y + g
set equal to a constant

G.7.a)  Setting a quadratic form equal to a constant and getting an ellipse

Here's an example of something folks call a quadratic form:

Clear[f, x, y];
f[x_, y_] = 
      2.3 (x^2) - 1.9 x y + 1.5 (y^2) + 12.4 x + 10.8 y

And look at this plot:

constant = 5;
curveplot = 
        ContourPlot[f[x, y], {x, -15, 5}, {y, -20, 6}, 
          Contours -> {constant}, Axes -> True, 
          AxesLabel -> {"x", "y"}, 
          ContourSmoothing -> Automatic, PlotPoints -> 50, 
          AspectRatio -> Automatic, 
          ColorFunction -> Automatic];

The border of the black region is a plot of the curve consisting of all the points {x,y} for which
             f[x,y] = constant = 5.
Parameterize and plot this curve.
Give the perpendicular frame on which it is hung and measure the length of the long axis and the short axis.

The border of the black region is a plot of the curve consisting of all the points {x,y} for which
             f[x,y] = constant = 5.
Parameterize and plot this curve.
Give the perpendicular frame on which it is hung and measure the length of the long axis and the short axis.
How is the shape of the ellipse related to the ratio of the eigenvalues of the Hessian?

G.7.b.i) Setting a quadratic form equal to a constant and getting a hyperbola

Here's another example of something folks call a quadratic form:

Clear[f, x, y];
f[x_, y_] = (x^2) + 5.4 x y + (y^2) + 2  .1 x + 1.7

And look at this plot:

constant = 8;
\(\(ranger = 30;\)
\)
curveplot = 
        ContourPlot[
          f[x, y], {x, -ranger, ranger}, {y, -ranger, ranger}, 
          Contours -> {constant}, Axes -> True, 
          AxesLabel -> {"x", "y"}, 
          ContourSmoothing -> Automatic, PlotPoints -> 100, 
          AspectRatio -> Automatic, 
          ColorFunction -> Automatic];

The border of the black region is a plot of the curve consisting of all the points {x,y} for which
             f[x,y] = constant = 8.
You decide to look at the Hessian of f[x,y]:

Clear[H];
(Subscript[H, f])[x_, y_]= (({{\(∂\_{x, 2}f[x, y]\), (∂_(x, y))f[x, 
                      y]}, {(∂_(x, y))f[x, y], \(∂\_{y, 2}f[x, 
                      y]\)}}));
MatrixForm[(Subscript[H, f])[x, y]]

And you look at the eigenvalues of the Hessian:

Eigenvalues[(Subscript[H, f])[x, y]]

And now you say: "I can explain why the plot came out the way it did." 
What did you mean?

G.7.b.ii)  Setting a quadratic form equal to a constant and getting an ellipse

Here's another example of something folks call a quadratic form:

Clear[f, x, y];
f[x_, y_] = (x^2) + 2.5 x y + 3 (y^2) + 2  .1 x + 1.7

And look at this plot:

constant = 12;
\(\(ranger = 5;\)
\)
curveplot = 
        ContourPlot[
          f[x, y], {x, -ranger, ranger}, {y, -ranger, ranger}, 
          Contours -> {constant}, Axes -> True, 
          AxesLabel -> {"x", "y"}, 
          ContourSmoothing -> Automatic, PlotPoints -> 100, 
          AspectRatio -> Automatic, 
          ColorFunction -> Automatic];

The border of the black region is a plot of the curve consisting of all the points {x,y} for which
             f[x,y] = constant = 12.
You decide to look at the Hessian of f[x,y]:

Clear[H];
(Subscript[H, f])[x_, y_]= (({{\(∂\_{x, 2}f[x, y]\), (∂_(x, y))f[
                        x, y]}, {(∂_(x, y))f[x, y], \(∂\_{y, 2}f[
                        x, y]\)}}));

MatrixForm[(Subscript[H, f])[x, y]]

And you look at the eigenvalues of the Hessian:

Eigenvalues[(Subscript[H, f])[x, y]]

And now you say: "I can explain why the plot came out the way it did." 
What did you mean?

G.7.b.iii) Setting a quadratic form equal to a constant and getting a line

Here's another example of something folks call a quadratic form:

Clear[f, x, y];
f[x_, y_] = (x^2) - 4 x y + 4 (y^2) + 1

And look at this plot:

constant = 2;
\(\(ranger = 30;\)
\)
curveplot = 
        ContourPlot[
          f[x, y], {x, -ranger, ranger}, {y, -ranger, ranger}, 
          Contours -> {constant}, Axes -> True, 
          AxesLabel -> {"x", "y"}, 
          ContourSmoothing -> Automatic, PlotPoints -> 100, 
          AspectRatio -> Automatic, 
          ColorFunction -> Automatic];

This is a plot of the curve defined by setting f[x,y] = constant = 2.
This puzzles you so you look at the gradient f[x,y]:

Clear[gradf];
gradf[x_, 
        y_]  =  {(∂_x) f[x, y], (∂_y) f[x, 
            y]}

Solve[gradf[x, y]  ==  {0, 0}]

And you look at the Hessian of f[x,y]:

Clear[H];
(Subscript[H, f])[x_, y_]= (({{\(∂\_{x, 2}f[x, y]\), (∂_(x, y))f[x, 
                      y]}, {(∂_(x, y))f[x, y], \(∂\_{y, 2}f[x, 
                      y]\)}}));
MatrixForm[(Subscript[H, f])[x, y]]

And you look at the eigenvalues of the Hessian:

Eigenvalues[(Subscript[H, f])[x, y]]

And now you exclaim: "I can explain why the plot came out the way it did!" 
What did you mean?

G.7.b.iv) Setting a quadratic form equal to a constant and getting a parabola

Here's another example of something folks call a quadratic form:

Clear[f, x, y];
f[x_, y_] = (x^2) - 4.0 x y + 4.0 (y^2) + 2.3 x + 1.3 y

And look at this plot:

constant = 2;
\(\(ranger = 30;\)
\)
curveplot = 
        ContourPlot[
          f[x, y], {x, -ranger, ranger}, {y, -ranger, ranger}, 
          Contours -> {constant}, Axes -> True, 
          AxesLabel -> {"x", "y"}, 
          ContourSmoothing -> Automatic, PlotPoints -> 100, 
          AspectRatio -> Automatic, 
          ColorFunction -> Automatic];

This is a plot of the curve defined by setting f[x,y] = constant = 2.
It's not totally clear whether this is a parabola or part of an ellipse.
You look at the gradient f[x,y]:

Clear[gradf];
gradf[x_, 
        y_]  =  {(∂_x) f[x, y], (∂_y) f[x, 
            y]}

Solve[gradf[x, y]  ==  {0, 0}]

And you look at the Hessian of f[x,y]:

Clear[H];
(Subscript[H, f])[x_, y_]= (({{\(∂\_{x, 2}f[x, y]\), (∂_(x, y))f[
                        x, y]}, {(∂_(x, y))f[x, y], \(∂\_{y, 2}f[
                        x, y]\)}}));

MatrixForm[
      (Subscript[H, f])[x, y]]

And you look at the eigenvalues of the Hessian:

Eigenvalues[(Subscript[H, f])[x, y]]

And now you exclaim: "I can explain why the plot came out the way it did! And I know that this plot is a parabola!"
What did you mean? And how did you come up with your decision?

G.8) Quadratic forms defined by a symmetric matrix A via
         f[x, y] = {x, y} . (A . {x, y})

G.8.a) Quadratic forms f[x,y]={x,y}.(A.{x,y}) don't  give rise to parabolas

Here's a symmetric matrix A:

Clear[f, x, y, a, b, c, d];
A  = {{a, b/2}, {b/2, c}};
\(MatrixForm[A]
	\)

Use A to define this function f[x,y]={x,y}.(A.{x,y}):

f[x_, y_] = Expand[{x, y} . (A . {x, y})]

This is a quadratic form.
Look at

gradf[x_, 
        y_] = {(∂_x) f[x, y], (∂_y) f[x, y]}

Notice that grad[0,0] = {0,0}:

gradf[0, 0]

Say why this gives away the fact that when you set f[x,y] = constant, you will not get a parabola.

G.8.a.ii) The Hessian

Stay with the same function f[x,y] and calculate the Hessian (Subscript[H, f])[x, y] . 
How is (Subscript[H, f])[x, y] related to A?

\(\(	H\_f[x_, y_] = 
      \ {{∂\_{x, 2}f[x, y], ∂\_\(x, y\)f[x, y]}, {
          ∂\_\(x, y\)f[x, y], ∂\_{y, 2}f[x, y]}}; 

    MatrixForm[H\_f[x, y]]\)\)

G.8.a.iii)

How do the eigenvalues and eigenvectors of a given symmetric matrix  A tell you how
how curves defined by setting 
           f[x,y]={x,y}.(A.{x,y}) = constant 
plot out?

G.8.a.iv)

Explain this:
What do you look for in symmetric matrix A do you to be sure that it is impossible for ||{x,y}|| to go to infinity while maintaining the equality {x,y}.(A.{x,y} )= 20?

G.9)  (A^t).A and the Grammian test for linear independence

G.9.a.i) The rank of (A^t).A is the same as the rank of A

Explain this:
Given any matrix A, the rank of (A^t).A is the same as the rank of A.

G.9.a.ii) If A is of full rank, then  (A^t).A is invertible

Explain this:
 If A is of full rank, then  (A^t).A is invertible.

G.9.b.i) The Grammian matrix

Given a set of vectors
           {X[1], X[2], . .., X[n]}
in kD, the corresponding Grammian matrix is the matrix with the entry 
           X[i] • X[j] 
in its ith horizontal row and jth vertical column. The resulting Grammian matrix is a nD (square) symmetric matrix.

Clued in folks know that the Grammian matrix is the same as (A^t).A  for a certain matrix A. What matrix A are they thinking about?

G.9.b.ii) The Grammian test for linear independence

Given a set vectors
           {X[1], X[2], . .., X[n]},
clued in folks know that saying that 
          {X[1], X[2], . .., X[n]} is a linearly independent set 
is the same as saying that  the determinant of the corresponding Grammian matrix is not 0.
How do they know this?

G.9.b.iii) A case in which the determinant of the Grammian matrix is 0

Here is a random set consisting of at least seven vectors in 6D:

number  =  Random[Integer, {7, 12}];
Clear[X, i, j];
\(Table[
      X[i_]\  = \ Table[Random[Real, {\(-10\), 10}], {j, 1, 6}], {i, 1, 
        number}]
\)

The determinant of the corresponding Grammian matrix is:

grammian  =  
        Table[X[i] . X[j], {i, 1, number}, {j, 1, number}];
Det[grammian]

Explain how you could have known this in advance.

G.10)  Another version of the Holy Grail: Working with  A . (A^t) instead of (A^t).A

G.10.a) Working with  A . (A^t) instead of (A^t).A

Given a matrix A, the matrix A . (A^t) is guaranteed to be symmetric. 
The Spectral theorem steps in to guarantee an orthonormal basis (perpendicular frame) 
          {(Subscript[Y, 1]),(Subscript[Y, 2]),(Subscript[Y, 3]), (Subscript[Y, 4]),....,(Subscript[Y, hangdim])}
of eigenvectors of A . (A^t) spanning all of hangdimD.

How are these vectors related to the SVD of A?

How can you use these vectors to find the SVD stretch factors of A?

G.11)  Trying to get SVD to spit out eigenvectors for symmetric matrices

G.11.a.i) Eigenvectors and SVD for symmetric matrices

Here's 2D symmetric matrix:

A = (({{1.6, 0.2}, {0.2, 0.3}}));
MatrixForm[A]

Compare Mathematica's calculation of eigenvectors of A with Mathematica's calculation of an SVD alignerframe of A:

Eigenvectors[A]

SingularValues[A][[3]]

For this matrix, the calculated SVD aligner frame consists of eigenvectors.

Here's another 2D symmetric matrix A:

s  =  0.3 Pi;
perpframe  =  {{Cos[s], Sin[s]}, {Cos[s + (π/2)], 
            Sin[s + (π/2)]}}; 
aligner  =  perpframe;
hanger  =  Transpose[aligner];
\(\(diagonal\  = \ DiagonalMatrix[{1.2, \(-0.6\)}];\)
		\)
A  =  hanger . diagonal  . aligner;
MatrixForm[A]

Compare Mathematica's calculation of eigenvectors of A with Mathematica's calculation of an SVD alignerframe of A:

Eigenvectors[A]

SingularValues[A][[3]]

Again for this matrix, the calculated SVD aligner frame consists of eigenvectors.
Here's another 2D symmetric matrix A:

s = 0.4 π; 
aligner = {{Cos[s], Sin[s]}, {Cos[s + (π/2)], 
          Sin[s + (π/2)]}}; 
hanger = Transpose[aligner]; 
diagonal = DiagonalMatrix[{2, -2}]; 
A = hanger . diagonal . aligner; 
MatrixForm[A]

Compare Mathematica's calculation of eigenvectors of A with Mathematica's calculation of an SVD alignerframe of A:

Eigenvectors[A]

SingularValues[A][[3]]

Are the calculated alignerframe vectors also eigenvectors of A?

G.11.a.ii) Sometimes any perpendicular frame works for an aligner frame

Stay with the same matrix A as in the very last of part i).
This the matrix A was made with this frame for both its aligner and hanger frames:

aligner

Yet Mathematica comes up with these aligner and hangerframes:

Clear[alignerframe, 
      hangerframe]; {alignerframe[1], 
        alignerframe[2]} =  SingularValues[A][[3]]
{hangerframe[1], 
        hangerframe[2]}  =  SingularValues[A][[1]]

And these stretch factors:

Clear[stretch];
\(	{stretch[1], 
        stretch[2]}\  = \ \(SingularValues[A]\)[\([2]\)]\)

Check:

A . alignerframe[1]  ==  stretch[1] hangerframe[1]

A . alignerframe[2]  ==  stretch[2] hangerframe[2]

Mathematica's calculation checks out.
Now look at (A^t) . A:

MatrixForm[Transpose[A] . A]

Remembering that an SVD alignerframe is any perpendicular frame that consists of eigenvectors of (A^t) . A, say why any 2D perpendicular frame works as an SVD aligner frame for A.

G.11.a.iii) Key info about  {stretch[1],stretch[2]} of a symmetric matrix

Take your best shot at this question:
Given a 2D symmetric matrix A, you look at the SVD stretch factors of A, {stretch[1],stretch[2]}.
When you look at  
           {stretch[1],stretch[2]} 
and extract the key information, it is possible to decide whether any computed SVD alignerframe is guaranteed to consist of eigenvectors of A. 
What is this key information?

G.11.a.iv) Key info about {eigenvalue[1],eigenvalue[2]} of a symmetric matrix

Take your best shot at this question:
Given a 2D symmetric matrix A, you look at the eigenvalues of A, {eigenvalue[1],eigenvalue[2]}.
When you look at 
          {eigenvalue[1],eigenvalue[2]} 
and extract the key information, it is possible to decide whether any computed SVD alignerframe is guaranteed to consist of eigenvectors of A. 
What is this key information?

G.11.b.i) Moving to higher dimensions

Take your best shot at this question:
Given a kD symmetric matrix A, you look at the eigenvalues of A, 
         {eigenvalue[1],eigenvalue[2], . . ,eigenvalue[k]} 
as guaranteed by the Spectral Theorem.
When you look at 
          {eigenvalue[1],eigenvalue[2], . . ,eigenvalue[k]}
and extract the key information, it is possible to decide whether any computed SVD alignerframe is guaranteed to consist of eigenvectors of A. 
What is this key information?

G.11.b.ii) Moving to higher dimensions

Take your best shot at this question:
Given a kD symmetric matrix A, you look at the SVD stretch factors of A, 
         {stretch[1],stretch[2], . . ,stretch[k]} (including the zero stretch factors)
as guaranteed by the Spectral Theorem.
When you look at 
          {stretch[1],stretch[2], . . ,stretch[k]}
and extract the key information, it is possible to decide whether any computed SVD alignerframe is guaranteed to consist of eigenvectors of A. 
What is this key information?