Page 137 - Numerical methods for chemical engineering
P. 137
Numerical calculation of eigenvalues and eigenvectors 123
so that
N N N N
[ j] [ j] [k] [ j]
v · Av = v · A c j w = v · c j Aw = c k w · c j λ j w
j=1 j=1 k=1 j=1
N N N
[k] [ j] 2
= c j c k λ j w · w = (3.124)
c λ j
j
k=1 j=1 j=1
Thus, a real symmetric matrix A is positive-definite if all of its eigenvalues are positive. If we
T
T
T
have only that v Av ≥ 0, A is said to be positive-semidefinite.If v Av < 0or v Av ≤ 0,
A is negative-definite or negative-semidefinite respectively. If no such condition holds for
N
all v ∈ , A is indefinite.
Theorem EVN3 If U is unitary, all of its eigenvalues have moduli of 1.
H
Proof We write U and U in normal form,
H
H
U = W W H U = W W H (3.125)
For U to be unitary, we require
H
H
H
H
UU = W W H W W H = W W = I (3.126)
Thus must also be unitary,
H
H
H
= W IW = W W = I (3.127)
¯
H
For each diagonal element of , λ j λ j , to be 1, we must have |λ j |= 1. QED
Numerical calculation of eigenvalues and eigenvectors in MATLAB
We now consider the numerical calculation of eigenvalues and eigenvectors. In this section,
we merely demonstrate the use of the MATLAB routines for computing eigenvalues and
eigenvectors. eig computes all eigenvalues and eigenvectors of a matrix, and eigs computes
only certain eigenvalues and eigenvectors of interest, e.g. those eigenvalues with the largest
moduli. In the following two sections, the algorithms used by these routines are discussed
in further detail.
Computing all eigenvalues and eigenvectors with eig
eig uses the iterative QR method (described below) to compute all eigenvalues and eigen-
vectors of a matrix. Consider the matrix
1 2 −1
A = 3 0 −2 (3.128)
−11 4
With a single output argument, eig returns a vector of eigenvalues,
A= [12- 1;30- 2; - 114];
e = eig(A),