User:Egm6322.s09.xyz/hw7 xyz

HW: Matlab to find Eigenvalues/Eigenvectors

--Egm6322.s09.xyz 19:52, 23 April 2009 (UTC)

Let $$ \mathbf{A} =

\begin{pmatrix} 2 & 5 \\ 5 & 7 \end{pmatrix}

$$

Using Matlab, the eigenvalues are given as:

$$\lambda_1 = =1.0902$$ and $$\lambda_2 = 10.0902$$

The corresponding eigenvectors are the columns of the following matrix:

$$

\begin{pmatrix} -0.8507 & 0.5257 \\ 0.5257 & 0.8507 \end{pmatrix}

$$

MATLAB CODE: A = [2 5 ; 5 7]; [v,d] = eig(A); %where eigenvalues are given in matrix d, and, %the eigenvectors are the columns of matrix v %such that A*v = b*v*d

HW: Use Matlab to prove that $$\mathbf{V}^{-1} = \mathbf{V}^T$$

Recall that for the matrix given above, the eigenvector matrix is given as:

$$

\mathbf{V} =

\begin{pmatrix} -0.8507 & 0.5257 \\ 0.5257 & 0.8507 \end{pmatrix}

$$

Using Matlab, the inverse of the eigenvector matrix is:

$$

\mathbf{V}^{-1} =

\begin{pmatrix} -0.8507 & 0.5257 \\ 0.5257 & 0.8507 \end{pmatrix}

$$

MATLAB CODE for the inverse of a matrix, V inv(v);

The respective transpose matrix is given as:

$$

\mathbf{V}^T =

\begin{pmatrix} -0.8507 & 0.5257 \\ 0.5257 & 0.8507 \end{pmatrix}

$$

MATLAB CODE for the transpose of a matrix, V v';

$$\therefore \mathbf{V}^{-1} = \mathbf{V}^T \surd$$ (verified)

HW: Use Matlab to show that $$\mathbf{V} \mathbf{\Lambda}\mathbf{V}^T = \mathbf{A}$$

Again, the matrix A is given as:

$$ \mathbf{A} =

\begin{pmatrix} 2 & 5 \\ 5 & 7 \end{pmatrix}

$$

From the information given above, it has already been shown that the eigenvalue (diagonal) matrix, given as $$\mathbf{\Lambda}$$ and the transpose of the eigenvector matrix, $$\mathbf{V}^T$$ are given as:

$$ \mathbf{\Lambda} =

\begin{pmatrix} -1.0902 & 0 \\ 0 & 10.0902 \end{pmatrix}

$$

and

$$ \mathbf{V}^T =

\begin{pmatrix} -0.8507 & 0.5257 \\ 0.5257 & 0.8507 \end{pmatrix}

$$

where

$$

\mathbf{V} =

\begin{pmatrix} -0.8507 & 0.5257 \\ 0.5257 & 0.8507 \end{pmatrix}

$$

Breaking the stated multiplication of the aformentioned matrices into two steps, one can see that:

$$

\mathbf{V} \mathbf{\Lambda} =

\begin{pmatrix} -0.8507 & 0.5257 \\ 0.5257 & 0.8507 \end{pmatrix}

\begin{pmatrix} -1.0902 & 0 \\ 0 & 10.0902 \end{pmatrix}

$$

$$ \therefore

\mathbf{V} \mathbf{\Lambda} =

\begin{pmatrix} 0.9274 & 5.3047 \\ -0.5731 & 8.5832 \end{pmatrix}

$$

and

$$

\left( \mathbf{V} \mathbf{\Lambda} \right) \mathbf{V}^T =

\begin{pmatrix} 0.9274 & 5.3047 \\ -0.5731 & 8.5832 \end{pmatrix}

\begin{pmatrix} -0.8507 & 0.5257 \\ 0.5257 & 0.8507 \end{pmatrix}

$$

$$ \therefore

\mathbf{V} \mathbf{\Lambda} \mathbf{V}^T = \mathbf{A} =

\begin{pmatrix} 2 & 5 \\ 5 & 7 \end{pmatrix}

\surd $$ verified

MATLAB Code for the combined matrix multiplication given above: A = [2 5; 5 7]; [v,d]=eig(A); %note: v = eigenvector matrix and d = diagonal eigenvalue matrix A_mult = v*d*v'; %Comparison of the matrix A to matrix A_mult %will yield A = A_mult

$$\mathbf{V}^{-1} = \mathbf{V}^T$$

$$\mathbf{V} \mathbf{\Lambda}\mathbf{V}^T = \mathbf{A}$$

note: Given any matrix, attempt to change coordinates so to express that matrix as simple as possible. Best = diagonal form. Not all matrices are diagonalizable; best = Jordan canonical form. An important case is the real symmetric matrix

$$

\begin{bmatrix} \lambda_1     & \cdots & 0      \\ \vdots & \ddots & \vdots \\ 0     & \cdots & \lambda_n \end{bmatrix}

$$

Ref: pg. 34-1, eqn 2

$$ \left \lfloor x \; y \right \rfloor

\underline{V} \underline{\Lambda}\underline{V}^T

\begin{Bmatrix} x \\ y \end{Bmatrix}

+

\left \lfloor d \; e \right \rfloor

\begin{Bmatrix} x \\ y \end{Bmatrix}

+ f

= 0

$$

Definition

$$

\begin{Bmatrix} \bar{x} \\ \bar{y} \end{Bmatrix}



\underline{V}^T

\begin{Bmatrix} x \\ y \end{Bmatrix}

$$



\Rightarrow

\begin{Bmatrix} x \\ y \end{Bmatrix}

= \underline{V}

\begin{Bmatrix} \bar{x} \\ \bar{y} \end{Bmatrix}

$$


 * where $$\underline{V} (\underline{V}^T) = \underline{I}$$

$$ \therefore

\left \lfloor \bar{x} \; \bar{y} \right \rfloor

\underline{\Lambda}

\begin{Bmatrix} \bar{x} \\ \bar{y} \end{Bmatrix}

+

\left \lfloor \bar{d} \; \bar{e} \right \rfloor

\begin{Bmatrix} \bar{x} \\ \bar{y} \end{Bmatrix}

+ f

= 0

$$

HW: ... show forward/backward mult. steps

Note that $$\underline{\Lambda} $$ is a diagonal matrix

$$

\begin{bmatrix} \lambda_1     & \cdots & 0      \\ \vdots & \ddots & \vdots \\ 0     & \cdots & \lambda_n \end{bmatrix}

$$

OR

$$

\underline{\Lambda} =

\begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix}

\Rightarrow

\left[ \lambda_1 \bar{x}^2 + \lambda_2 \bar{y}^2 \right]

+\bar{d} \bar{x} + \bar{e}\bar{y}

+ f = 0

$$

Consider the cases where:

Case#1: $$\lambda_1 \lambda_2 < 0$$ (hyperbola) or $$\lambda_1 \lambda_2 > 0$$ (ellipses)

Case#2: $$\lambda_1 \lambda_2 = 0$$(parabolas)

HW: state the equivalence