Docsity

Orthonormal Vectors - Computational Methods | CMSC 460, Study notes of Computer Science

Partial preview of the text

Download Orthonormal Vectors - Computational Methods | CMSC 460 and more Study notes Computer Science in PDF only on Docsity!

Orthonormal Vectors

•^

A set S of nonzero vectors are

orthonormal

if, for

every

x

and

y

in S, we have dot(

x

, y

(orthogonality) and for every

x

in S we have ||

x

||^2

(length is 1).

The QR Algorithm

•^

The QR algorithm for finding eigenvalues is based onthe QR factorisation we learnt in the least squares partof the course

-^

Recall the QR factorization represents a matrix A as:

A = QR

where Q is a matrix whose columns are orthonormal,and R is an upper triangular matrix.

-^

Recall that Q

H^ Q = I and Q

=Q

H

•^

Q is termed a

unitary

matrix.

QR Algorithm with Shift

A

0

= A for k=1,2,…

s = A

(n,n)k

Q

Rk^

k^

= A

  • sIk^

A

k+

= R

Qk

k^

  • sI

end

Since:

A

k+

= R

Qk

k^

  • sI

= Q

-1(k

A

k^

  • sI)Q

k^

+sI

= Q

-1k

A

Qk

k

so once again A

k^

and A

k+

are

similar and so have the sameeigenvalues.

The shift operation subtracts s from each eigenvalueof A, and speeds up convergence.

MATLAB Code for QR Algorithm

•^

Let A be an n

×

n matrix

n = size(A,1);I = eye(n,n);s = A(n,n); [Q,R] = qr(A-sI); A = RQ+s*I

-^

Use the up arrow key in MATLAB to iterate or put a loopround the last line.

Computational Methods CMSC/AMSC/MAPL 460

EigenValue decomposition

Singular Value Decomposition

Ramani Duraiswami, Dept. of Computer Science

Eigenvalue sensitivity

Relation with the Eigenvalue Decomposition

•^

Let

A

U

V

*^

.^

Then A

*^

A =

U

V

*^

U

V

V

*^

U

*^

U

V

*^ =

V

2

V

•^

This tells us that the singular value decomposition of

A

is

related to the Eigenvalue decomposition of

A

*^

A

•^

Recall eigen value decomposition

A=

(

X

Λ

X

* )

  • So

V

which contains the right singular vectors of

A

has the

right eigenvectors of

A

*^

A

Σ

2

are the eigenvalues of

A

*^

A

  • The

singular values

σ

of i

A

are the square roots of the

eigenvalues

of

A

*^

A

.

Relation with the Eigenvalue Decomposition (2)

•^

Let

A

U

V.

Then^ A A

*^

U

V

U

V

*^ )

U

V

* V

*^

U

*^

U

2

U

•^

This tells us that the singular value decomposition of

A

is

related to the Eigenvalue decomposition of

AA

*

•^

Recall eigen value decomposition

A=

(

X

Λ

X

* )

  • So

U

contains the the

left singular vectors

of

A

, which are also

the left eigenvectors of

AA

Σ

2

are the eigenvalues of

AA

*^

and t

he

singular values

σ

of i

A

are the square roots of the

eigenvalues

of

AA

Computing the SVD

•^

The algorithm is a variant on algorithms for computingeigendecompositions.–

rather complicated, so better to use a high-quality existing coderather than writing your own.

•^

In Matlab: [U,S,V] = svd(A)

-^

The cost is

O

( mn

2 ) when

m

n

. The constant is of order

Uses of the SVD

•^

Recall to solve least squares problems we could look atthe normal equations (A

*Ax=A

*^ b)

  • So, SVD is closely related to solution of least-squares– Used for solving ill conditioned least-squares -^

Used for creating low-rank approximations

-^

Both applications are related

SVD and pseudo inverse

Well posed problems

-^

Hadamard postulated that for a problem to be “well posed”

Solution must exist

It must be unique

Small changes to input data should cause small changes to solution

-^

Many problems in science and computer vision result in “ill-posed” problems.–^

Numerically it is common to have condition 3 violated.

-^

Recall from the SVD If the

σ

are close to zero small changes in the “data” vector

b

cause

big changes in

x

.

-^

Converting ill-posed problem to well-posed one is called regularization

.