matrices cs485/685 computer vision dr. george bebis

25
Matrices CS485/685 Computer Vision Dr. George Bebis

Upload: eugene-buck-washington

Post on 23-Dec-2015

230 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Matrices CS485/685 Computer Vision Dr. George Bebis

Matrices

CS485/685 Computer Vision

Dr. George Bebis

Page 2: Matrices CS485/685 Computer Vision Dr. George Bebis

Matrix Operations

• Matrix addition/subtraction– Matrices must be of same size.

• Matrix multiplication

Condition: n = q

m x n q x p m x p

Page 3: Matrices CS485/685 Computer Vision Dr. George Bebis

Identity Matrix

Page 4: Matrices CS485/685 Computer Vision Dr. George Bebis

Matrix Transpose

Page 5: Matrices CS485/685 Computer Vision Dr. George Bebis

Symmetric Matrices

Example:

Page 6: Matrices CS485/685 Computer Vision Dr. George Bebis

Determinants

2 x 2

3 x 3

n x n

Page 7: Matrices CS485/685 Computer Vision Dr. George Bebis

Determinants (cont’d)

diagonal matrix:

Page 8: Matrices CS485/685 Computer Vision Dr. George Bebis

Matrix Inverse

• The inverse A-1 of a matrix A has the property:

AA-1=A-1A=I

• A-1 exists only if

• Terminology– Singular matrix: A-1 does not exist

– Ill-conditioned matrix: A is close to being singular

Page 9: Matrices CS485/685 Computer Vision Dr. George Bebis

Matrix Inverse (cont’d)

• Properties of the inverse:

Page 10: Matrices CS485/685 Computer Vision Dr. George Bebis

Pseudo-inverse

• The pseudo-inverse A+ of a matrix A (could be non-square, e.g., m x n) is given by:

• It can be shown that:

Page 11: Matrices CS485/685 Computer Vision Dr. George Bebis

Matrix trace

properties:

Page 12: Matrices CS485/685 Computer Vision Dr. George Bebis

Rank of matrix

• Equal to the dimension of the largest square sub-matrix of A that has a non-zero determinant.

Example: has rank 3

Page 13: Matrices CS485/685 Computer Vision Dr. George Bebis

Rank of matrix (cont’d)• Alternative definition: the maximum number of

linearly independent columns (or rows) of A.

Therefore,rank is not 4 !Example:

Page 14: Matrices CS485/685 Computer Vision Dr. George Bebis

Rank and singular matrices

Page 15: Matrices CS485/685 Computer Vision Dr. George Bebis

Orthogonal matrices

• A is orthogonal if:

• Notation:

Example:

Page 16: Matrices CS485/685 Computer Vision Dr. George Bebis

Orthonormal matrices

• A is orthonormal if:

• Note that if A is orthonormal, it easy to find its inverse:

Property:

Page 17: Matrices CS485/685 Computer Vision Dr. George Bebis

Eigenvalues and Eigenvectors

• The vector v is an eigenvector of matrix A and λ is an eigenvalue of A if:

• Interpretation: the linear transformation implied by A cannot change the direction of the eigenvectors v, only their magnitude.

(assume non-zero v)

Page 18: Matrices CS485/685 Computer Vision Dr. George Bebis

Computing λ and v

• To find the eigenvalues λ of a matrix A, find the roots of the characteristic polynomial:

Example:

Page 19: Matrices CS485/685 Computer Vision Dr. George Bebis

Properties

• Eigenvalues and eigenvectors are only defined for square matrices (i.e., m = n)

• Eigenvectors are not unique (e.g., if v is an eigenvector, so is kv)

• Suppose λ1, λ2, ..., λn are the eigenvalues of A, then:

Page 20: Matrices CS485/685 Computer Vision Dr. George Bebis

Properties (cont’d)

xTAx > 0 for every

Page 21: Matrices CS485/685 Computer Vision Dr. George Bebis

Matrix diagonalization

• Given A, find P such that P-1AP is diagonal (i.e., P diagonalizes A)

• Take P = [v1 v2 . . . vn], where v1,v2 ,. . . vn are the eigenvectors of A:

Page 22: Matrices CS485/685 Computer Vision Dr. George Bebis

Matrix diagonalization (cont’d)

Example:

Page 23: Matrices CS485/685 Computer Vision Dr. George Bebis

• Only if P-1 exists (i.e., A must have n linearly independent eigenvectors, that is, rank(A)=n)

• If A has n distinct eigenvalues λ1, λ2, ..., λn , then the corresponding eigevectors v1,v2 ,. . . vn form a basis:

(1) linearly independent

(2) span Rn

Are all n x n matrices diagonalizable?

Page 24: Matrices CS485/685 Computer Vision Dr. George Bebis

Diagonalization Decomposition

• Let us assume that A is diagonalizable, then:

Page 25: Matrices CS485/685 Computer Vision Dr. George Bebis

Decomposition: symmetric matrices

• The eigenvalues of symmetric matrices are all real.

• The eigenvectors corresponding to distinct eigenvalues are orthogonal.

A=PDPT=

P-1=PT