Linear Algebra Primer

Similar documents
Linear Algebra Primer

Linear Algebra Primer

Linear Algebra Primer

Let us start with a two dimensional case. We consider a vector ( x,

Elements of Computer Graphics

t is a basis for the solution space to this system, then the matrix having these solutions as columns, t x 1 t, x 2 t,... x n t x 2 t...

10. State Space Methods

This is an example to show you how SMath can calculate the movement of kinematic mechanisms.

Then. 1 The eigenvalues of A are inside R = n i=1 R i. 2 Union of any k circles not intersecting the other (n k)

MATH 2050 Assignment 9 Winter Do not need to hand in. 1. Find the determinant by reducing to triangular form for the following matrices.

Two Coupled Oscillators / Normal Modes

Chapter 2. First Order Scalar Equations

V The Fourier Transform

Concourse Math Spring 2012 Worked Examples: Matrix Methods for Solving Systems of 1st Order Linear Differential Equations

Math 334 Fall 2011 Homework 11 Solutions

Math Week 14 April 16-20: sections first order systems of linear differential equations; 7.4 mass-spring systems.

Outline of Topics. Analysis of ODE models with MATLAB. What will we learn from this lecture. Aim of analysis: Why such analysis matters?

Exercises: Similarity Transformation

SOLUTIONS TO ECE 3084

CS376 Computer Vision Lecture 6: Optical Flow

The fundamental mass balance equation is ( 1 ) where: I = inputs P = production O = outputs L = losses A = accumulation

Chapter 6. Systems of First Order Linear Differential Equations

KEY. Math 334 Midterm I Fall 2008 sections 001 and 003 Instructor: Scott Glasgow

Finish reading Chapter 2 of Spivak, rereading earlier sections as necessary. handout and fill in some missing details!

Math 315: Linear Algebra Solutions to Assignment 6

Second Order Linear Differential Equations

SUMMARY. CS380: Introduction to Computer Graphics Quaternions Chapter 7. Min H. Kim KAIST School of Computing 18/04/06.

KINEMATICS IN ONE DIMENSION

Chapter 7: Solving Trig Equations

Announcements: Warm-up Exercise:

Math 221: Mathematical Notation

Chapter 3 Kinematics in Two Dimensions

Designing Information Devices and Systems I Spring 2019 Lecture Notes Note 17

Lecture Notes 2. The Hilbert Space Approach to Time Series

Math 2142 Exam 1 Review Problems. x 2 + f (0) 3! for the 3rd Taylor polynomial at x = 0. To calculate the various quantities:

Biol. 356 Lab 8. Mortality, Recruitment, and Migration Rates

HW6: MRI Imaging Pulse Sequences (7 Problems for 100 pts)

ODEs II, Lecture 1: Homogeneous Linear Systems - I. Mike Raugh 1. March 8, 2004

From Complex Fourier Series to Fourier Transforms

Lecture 2-1 Kinematics in One Dimension Displacement, Velocity and Acceleration Everything in the world is moving. Nothing stays still.

Problem set 6: Solutions Math 207A, Fall x 0 2 x

Unit Root Time Series. Univariate random walk

Notes 04 largely plagiarized by %khc

Chapters 6 & 7: Trigonometric Functions of Angles and Real Numbers. Divide both Sides by 180

Linear Dynamic Models

Mathcad Lecture #8 In-class Worksheet Curve Fitting and Interpolation

Math Wednesday March 3, , 4.3: First order systems of Differential Equations Why you should expect existence and uniqueness for the IVP

The Fundamental Theorems of Calculus

EE243 Advanced Electromagnetic Theory Lec # 13: Waveguides and sources

2.7. Some common engineering functions. Introduction. Prerequisites. Learning Outcomes

23.2. Representing Periodic Functions by Fourier Series. Introduction. Prerequisites. Learning Outcomes

3, so θ = arccos

dy dx = xey (a) y(0) = 2 (b) y(1) = 2.5 SOLUTION: See next page

System of Linear Differential Equations

The Lorentz Transformation

Some Basic Information about M-S-D Systems

Laplace transfom: t-translation rule , Haynes Miller and Jeremy Orloff

3.1.3 INTRODUCTION TO DYNAMIC OPTIMIZATION: DISCRETE TIME PROBLEMS. A. The Hamiltonian and First-Order Conditions in a Finite Time Horizon

PENALIZED LEAST SQUARES AND PENALIZED LIKELIHOOD

EE 315 Notes. Gürdal Arslan CLASS 1. (Sections ) What is a signal?

SMT 2014 Calculus Test Solutions February 15, 2014 = 3 5 = 15.

15. Bicycle Wheel. Graph of height y (cm) above the axle against time t (s) over a 6-second interval. 15 bike wheel

Today: Falling. v, a

Physics 235 Chapter 2. Chapter 2 Newtonian Mechanics Single Particle

Be able to sketch a function defined parametrically. (by hand and by calculator)

Linear Response Theory: The connection between QFT and experiments

LAPLACE TRANSFORM AND TRANSFER FUNCTION

Content-Based Shape Retrieval Using Different Shape Descriptors: A Comparative Study Dengsheng Zhang and Guojun Lu

and v y . The changes occur, respectively, because of the acceleration components a x and a y

a. Show that these lines intersect by finding the point of intersection. b. Find an equation for the plane containing these lines.

The Arcsine Distribution

Maxwell s Equations and Electromagnetic Waves

Non-uniform circular motion *

y z P 3 P T P1 P 2. Werner Purgathofer. b a

ES.1803 Topic 22 Notes Jeremy Orloff

Solutions from Chapter 9.1 and 9.2

Some Ramsey results for the n-cube

LAB # 2 - Equilibrium (static)

Homework sheet Exercises done during the lecture of March 12, 2014

Section 4.4 Logarithmic Properties

Today: Graphing. Note: I hope this joke will be funnier (or at least make you roll your eyes and say ugh ) after class. v (miles per hour ) Time

Vector Calculus. Chapter 2

Distance Between Two Ellipses in 3D

Echocardiography Project and Finite Fourier Series

Inventory Analysis and Management. Multi-Period Stochastic Models: Optimality of (s, S) Policy for K-Convex Objective Functions

Chapter Three Systems of Linear Differential Equations

Mon Apr 9 EP 7.6 Convolutions and Laplace transforms. Announcements: Warm-up Exercise:

( ) a system of differential equations with continuous parametrization ( T = R + These look like, respectively:

10.6 Parametric Equations

Operators related to the Jacobi setting, for all admissible parameter values

Y 0.4Y 0.45Y Y to a proper ARMA specification.

; row vectors: 1 3 4, 1 2 5, 2 6 7

Linear Time-invariant systems, Convolution, and Cross-correlation

And the solution to the PDE problem must be of the form Π 1

Formulation of the Stress Distribution Due to a Concentrated Force Acting on the Boundary of Viscoelastic Half-Space

Physics 180A Fall 2008 Test points. Provide the best answer to the following questions and problems. Watch your sig figs.

THE MATRIX-TREE THEOREM

Week 1 Lecture 2 Problems 2, 5. What if something oscillates with no obvious spring? What is ω? (problem set problem)

e a s a f t dt f t dt = p = p. t = a

Math Week 15: Section 7.4, mass-spring systems. These are notes for Monday. There will also be course review notes for Tuesday, posted later.

Transcription:

Linear Algebra Primer Juan Carlos Niebles and Ranja Krishna Sanford Vision and Learning Lab Anoher, ver in-deph linear algebra review from CS229 is available here: hp://cs229.sanford.edu/secion/cs229-linalg.pdf And a video discussion of linear algebra from EE263 is here (lecures 3 and 4): hps://see.sanford.edu/course/ee263 Sanford Universi /2/7

Ouline Vecors and marices Basic Mari Operaions Deerminans, norms, race Special Marices Transformaion Marices Homogeneous coordinaes Translaion Mari inverse Mari rank Eigenvalues and Eigenvecors Mari Calculus Sanford Universi 2 /2/7

Ouline Vecors and marices Basic Mari Operaions Deerminans, norms, race Special Marices Transformaion Marices Homogeneous coordinaes Translaion Mari inverse Mari rank Eigenvalues and Eigenvecors Mari Calculus Vecors and marices are jus collecions of ordered numbers ha represen somehing: movemens in space, scaling facors, piel brighness, ec. We ll define some common uses and sandard operaions on hem. Sanford Universi 3 /2/7

Vecor A column vecor where A row vecor where denoes he ranspose operaion Sanford Universi 4 /2/7

Vecor We ll defaul o column vecors in his class You ll wan o keep rack of he orienaion of our vecors when programming in phon You can ranspose a vecor V in phon b wriing V.. (Bu in class maerials, we will alwas use V T o indicae ranspose, and we will use V o mean V prime ) Sanford Universi 5 /2/7

Vecors have wo main uses Vecors can represen an offse in 2D or 3D space Poins are jus vecors from he origin Daa (piels, gradiens a an image kepoin, ec) can also be reaed as a vecor Such vecors don have a geomeric inerpreaion, bu calculaions like disance can sill have value Sanford Universi 6 /2/7

Mari A mari is an arra of numbers wih size b, i.e. m rows and n columns. If, we sa ha is square. Sanford Universi 7 /2/7

Images Phon represens an image as a mari of piel brighnesses Noe ha he upper lef corner is [,] (,) Sanford Universi 8 /2/7

Color Images Grascale images have one number per piel, and are sored as an m n mari. Color images have 3 numbers per piel red, green, and blue brighnesses (RGB) Sored as an m n 3 mari Sanford Universi 9 /2/7

Basic Mari Operaions We will discuss: Addiion Scaling Do produc Muliplicaion Transpose Inverse / pseudoinverse Deerminan / race Sanford Universi /2/7

Mari Operaions Addiion Can onl add a mari wih maching dimensions, or a scalar. Scaling Sanford Universi /2/7

Vecors Norm More formall, a norm is an funcion ha saisfies 4 properies: Non-negaivi: For all Definieness: f() if and onl if. Homogenei: For all Triangle inequali: For all Sanford Universi 2 /2/7

Mari Operaions Eample Norms General norms: Sanford Universi 3 /2/7

Mari Operaions Inner produc (do produc) of vecors Mulipl corresponding enries of wo vecors and add up he resul is also Cos( he angle beween and ) Sanford Universi 4 /2/7

Mari Operaions Inner produc (do produc) of vecors If B is a uni vecor, hen A B gives he lengh of A which lies in he direcion of B Sanford Universi 5 /2/7

Mari Operaions The produc of wo marices Sanford Universi 6 /2/7

Muliplicaion Mari Operaions The produc AB is: Each enr in he resul is (ha row of A) do produc wih (ha column of B) Man uses, which will be covered laer Sanford Universi 7 /2/7

Mari Operaions Muliplicaion eample: Each enr of he mari produc is made b aking he do produc of he corresponding row in he lef mari, wih he corresponding column in he righ one. Sanford Universi 8 /2/7

Mari Operaions The produc of wo marices Sanford Universi 9 /2/7

Mari Operaions Powers B convenion, we can refer o he mari produc AA as A 2, and AAA as A 3, ec. Obviousl onl square marices can be muliplied ha wa Sanford Universi 2 /2/7

Mari Operaions Transpose flip mari, so row becomes column A useful ideni: Sanford Universi 2 /2/7

Deerminan reurns a scalar Represens area (or volume) of he parallelogram described b he vecors in he rows of he mari For, Properies: Mari Operaions Sanford Universi 22 /2/7

Mari Operaions Trace Invarian o a lo of ransformaions, so i s used someimes in proofs. (Rarel in his class hough.) Properies: Sanford Universi 23 /2/7

Mari Operaions Vecor Norms Mari norms: Norms can also be defined for marices, such as he Frobenius norm: Sanford Universi 24 /2/7

Special Marices Ideni mari I Square mari, s along diagonal, s elsewhere I [anoher mari] [ha mari] Diagonal mari Square mari wih numbers along diagonal, s elsewhere A diagonal [anoher mari] scales he rows of ha mari Sanford Universi 25 /2/7

Special Marices Smmeric mari Skew-smmeric mari 2 2 3 5 42 75 5 7 Sanford Universi 26 /2/7

Linear Algebra Primer Juan Carlos Niebles and Ranja Krishna Sanford Vision and Learning Lab Anoher, ver in-deph linear algebra review from CS229 is available here: hp://cs229.sanford.edu/secion/cs229-linalg.pdf And a video discussion of linear algebra from EE263 is here (lecures 3 and 4): hps://see.sanford.edu/course/ee263 Sanford Universi 27 /2/7

Announcemens par HW submied las nigh HW is due ne Monda HW2 will be released onigh Class noes from las Thursda due before class in eacl 48 hours Sanford Universi 28 /2/7

Announcemens par 2 Fuure homework assignmens will be released via gihub Will allow ou o keep rack of changes IF he happen. Submissions for HW onwards will be done all hrough gradescope. NO MORE CORN SUBMISSIONS You will have separae submissions for he iphon pdf and he phon code. Sanford Universi 29 /2/7

Recap - Vecor A column vecor where A row vecor where denoes he ranspose operaion Sanford Universi 3 /2/7

Recap - Mari A mari is an arra of numbers wih size b, i.e. m rows and n columns. If, we sa ha is square. Sanford Universi 3 /2/7

Recap - Color Images Grascale images have one number per piel, and are sored as an m n mari. Color images have 3 numbers per piel red, green, and blue brighnesses (RGB) Sored as an m n 3 mari Sanford Universi 32 /2/7

Recap - Vecors Norm More formall, a norm is an funcion ha saisfies 4 properies: Non-negaivi: For all Definieness: f() if and onl if. Homogenei: For all Triangle inequali: For all Sanford Universi 33 /2/7

Recap projecion Inner produc (do produc) of vecors If B is a uni vecor, hen A B gives he lengh of A which lies in he direcion of B Sanford Universi 34 /2/7

Ouline Vecors and marices Basic Mari Operaions Deerminans, norms, race Special Marices Transformaion Marices Homogeneous coordinaes Translaion Mari inverse Mari rank Eigenvalues and Eigenvecors Mari Calculus Mari muliplicaion can be used o ransform vecors. A mari used in his wa is called a ransformaion mari. Sanford Universi 35 /2/7

Transformaion Marices can be used o ransform vecors in useful was, hrough muliplicaion: A Simples is scaling: (Verif o ourself ha he mari muliplicaion works ou his wa) Sanford Universi 36 /2/7

Roaion How can ou conver a vecor represened in frame o a new, roaed coordinae frame? Sanford Universi 37 /2/7

Roaion How can ou conver a vecor represened in frame o a new, roaed coordinae frame? Remember wha a vecor is: [componen in direcion of he frame s ais, componen in direcion of ais] Sanford Universi 38 /2/7

Roaion So o roae i we mus produce his vecor: [componen in direcion of new ais, componen in direcion of new ais] We can do his easil wih do producs! New coordinae is [original vecor] do [he new ais] New coordinae is [original vecor] do [he new ais] Sanford Universi 39 /2/7

Roaion Insigh: his is wha happens in a mari*vecor muliplicaion Resul coordinae is: [original vecor] do [mari row ] So mari muliplicaion can roae a vecor p: Sanford Universi 4 /2/7

Roaion Suppose we epress a poin in he new coordinae ssem which is roaed lef If we plo he resul in he original coordinae ssem, we have roaed he poin righ Thus, roaion marices can be used o roae vecors. We ll usuall hink of hem in ha sense-- as operaors o roae vecors Sanford Universi 4 /2/7

2D Roaion Mari Formula Couner-clockwise roaion b an angle q P q cosθ -sin θ cosθ + sin θ P é écosq - sin q é sin q cosq P R P Sanford Universi 42 /2/7

Transformaion Marices Muliple ransformaion marices can be used o ransform a poin: p R 2 R S p Sanford Universi 43 /2/7

Transformaion Marices Muliple ransformaion marices can be used o ransform a poin: p R 2 R S p The effec of his is o appl heir ransformaions one afer he oher, from righ o lef. In he eample above, he resul is (R 2 (R (S p))) Sanford Universi 44 /2/7

Transformaion Marices Muliple ransformaion marices can be used o ransform a poin: p R 2 R S p The effec of his is o appl heir ransformaions one afer he oher, from righ o lef. In he eample above, he resul is (R 2 (R (S p))) The resul is eacl he same if we mulipl he marices firs, o form a single ransformaion mari: p (R 2 R S) p Sanford Universi 45 /2/7

Homogeneous ssem In general, a mari muliplicaion les us linearl combine componens of a vecor This is sufficien for scale, roae, skew ransformaions. Bu noice, we can add a consan! L Sanford Universi 46 /2/7

Homogeneous ssem The (somewha hack) soluion? Sick a a he end of ever vecor: Now we can roae, scale, and skew like before, AND ranslae (noe how he muliplicaion works ou, above) This is called homogeneous coordinaes Sanford Universi 47 /2/7

Homogeneous ssem In homogeneous coordinaes, he muliplicaion works ou so he righmos column of he mari is a vecor ha ges added. Generall, a homogeneous ransformaion mari will have a boom row of [ ], so ha he resul has a a he boom oo. Sanford Universi 48 /2/7

Homogeneous ssem One more hing we migh wan: o divide he resul b somehing For eample, we ma wan o divide b a coordinae, o make hings scale down as he ge farher awa in a camera image Mari muliplicaion can acuall divide So, b convenion, in homogeneous coordinaes, we ll divide he resul b is las coordinae afer doing a mari muliplicaion Sanford Universi 49 /2/7

2D Translaion P P Sanford Universi 5 /2/7

Sanford Universi /2/7 5 2D Translaion using Homogeneous Coordinaes P P é é é + + P,), ( ), (,), ( ), ( P P

Sanford Universi /2/7 52 2D Translaion using Homogeneous Coordinaes P P é é é + + P,), ( ), (,), ( ), ( P P

Sanford Universi /2/7 53 2D Translaion using Homogeneous Coordinaes P P é é é + + P,), ( ), (,), ( ), ( P P

Sanford Universi /2/7 54 2D Translaion using Homogeneous Coordinaes P P é é é + + P,), ( ), (,), ( ), ( P P

Sanford Universi /2/7 55 2D Translaion using Homogeneous Coordinaes P P é é é + + P,), ( ), (,), ( ), ( P P P T P I é

Scaling P P Sanford Universi 56 /2/7

Scaling Equaion s P P (, ) P (s,s ) P P (, ) (,,) s P ( s, s ) ( s, s,) Sanford Universi 57 /2/7

Sanford Universi Scaling Equaion P s P s é é é s s s s P,), ( ), (,), ( ), ( s s s s P P ),s (s ), ( P P /2/7 58

Sanford Universi Scaling Equaion P s P s é é é s s s s P,), ( ), (,), ( ), ( s s s s P P S P S P S é ),s (s ), ( P P /2/7 59

Scaling & Translaing P P P S P P T P P T P T (S P) T S P Sanford Universi 6 /2/7

Sanford Universi Scaling & Translaing P T S P " # $ $ $ $ % & s s " # $ $ $ $ % & " # $ $ $ % & s s " # $ $ $ $ % & " # $ $ $ % & s + s + " # $ $ $ $ % & S " # $ % & " # $ $ $ % & A /2/7 6

Sanford Universi Scaling & Translaing P T S P " # $ $ $ $ % & s s " # $ $ $ $ % & " # $ $ $ % & s s " # $ $ $ $ % & " # $ $ $ % & s + s + " # $ $ $ $ % & S " # $ % & " # $ $ $ % & /2/7 62

Sanford Universi Translaing & Scaling versus Scaling & Translaing é + + é é é é é s s s s s s P S T P /2/7 63

Sanford Universi Translaing & Scaling! Scaling & Translaing é + + é é é é é s s s s s s s s s s P T S P é + + é é é é é s s s s s s P S T P /2/7 64

Sanford Universi Translaing & Scaling! Scaling & Translaing é + + é é é é é s s s s s s s s s s P T S P é + + é é é é é s s s s s s P S T P /2/7 65

Roaion P P Sanford Universi 66 /2/7

Roaion Equaions Couner-clockwise roaion b an angle q P q P cosθ -sin θ cosθ + sin θ é écosq - sin q é sin q cosq P R P Sanford Universi 67 /2/7

Roaion Mari Properies é écosq - sin q é sin q cosq A 2D roaion mari is 22 Noe: R belongs o he caegor of normal marices and saisfies man ineresing properies: R R T R T R I de( R) Sanford Universi 68 /2/7

Roaion Mari Properies Transpose of a roaion mari produces a roaion in he opposie direcion R R T de( R) R The rows of a roaion mari are alwas muuall perpendicular (a.k.a. orhogonal) uni vecors (and so are is columns) R T I Sanford Universi 69 /2/7

Sanford Universi Scaling + Roaion + Translaion P (T R S) P é é é - é s s cosθ sinθ sin θ cosθ R P S T P é é é - s s cosθ sinθ sin θ cosθ é é é é é R S S R /2/7 7 This is he form of he general-purpose ransformaion mari

Ouline Vecors and marices Basic Mari Operaions Deerminans, norms, race Special Marices Transformaion Marices Homogeneous coordinaes Translaion Mari inverse Mari rank Eigenvalues and Eigenvecors Mari Calculae The inverse of a ransformaion mari reverses is effec Sanford Universi 7 /2/7

Given a mari A, is inverse A - is a mari such ha AA - A - A I E.g. Inverse Inverse does no alwas eis. If A - eiss, A is inverible or non-singular. Oherwise, i s singular. Useful ideniies, for marices ha are inverible: Sanford Universi 72 /2/7

Mari Operaions Pseudoinverse Sa ou have he mari equaion AXB, where A and B are known, and ou wan o solve for X Sanford Universi 73 /2/7

Mari Operaions Pseudoinverse Sa ou have he mari equaion AXB, where A and B are known, and ou wan o solve for X You could calculae he inverse and pre-mulipl b i: A - AXA - B XA - B Sanford Universi 74 /2/7

Mari Operaions Pseudoinverse Sa ou have he mari equaion AXB, where A and B are known, and ou wan o solve for X You could calculae he inverse and pre-mulipl b i: A - AXA - B XA - B Phon command would be np.linalg.inv(a)*b Bu calculaing he inverse for large marices ofen brings problems wih compuer floaing-poin resoluion (because i involves working wih ver small and ver large numbers ogeher). Or, our mari migh no even have an inverse. Sanford Universi 75 /2/7

Mari Operaions Pseudoinverse Forunael, here are workarounds o solve AXB in hese siuaions. And phon can do hem! Insead of aking an inverse, direcl ask phon o solve for X in AXB, b ping np.linalg.solve(a, B) Phon will r several appropriae numerical mehods (including he pseudoinverse if he inverse doesn eis) Phon will reurn he value of X which solves he equaion If here is no eac soluion, i will reurn he closes one If here are man soluions, i will reurn he smalles one Sanford Universi 76 /2/7

Phon eample: Mari Operaions >> impor nump as np >> np.linalg.solve(a,b). -.5 Sanford Universi 77 /2/7

Ouline Vecors and marices Basic Mari Operaions Deerminans, norms, race Special Marices Transformaion Marices Homogeneous coordinaes Translaion Mari inverse Mari rank Eigenvalues and Eigenvecors Mari Calculae The rank of a ransformaion mari ells ou how man dimensions i ransforms a vecor o. Sanford Universi 78 /2/7

Linear independence Suppose we have a se of vecors v,, v n If we can epress v as a linear combinaion of he oher vecors v 2 v n, hen v is linearl dependen on he oher vecors. The direcion v can be epressed as a combinaion of he direcions v 2 v n. (E.g. v.7 v 2 -.7 v 4 ) Sanford Universi 79 /2/7

Linear independence Suppose we have a se of vecors v,, v n If we can epress v as a linear combinaion of he oher vecors v 2 v n, hen v is linearl dependen on he oher vecors. The direcion v can be epressed as a combinaion of he direcions v 2 v n. (E.g. v.7 v 2 -.7 v 4 ) If no vecor is linearl dependen on he res of he se, he se is linearl independen. Common case: a se of vecors v,, v n is alwas linearl independen if each vecor is perpendicular o ever oher vecor (and non-zero) Sanford Universi 8 /2/7

Linear independence Linearl independen se No linearl independen Sanford Universi 8 /2/7

Mari rank Column/row rank Column rank alwas equals row rank Mari rank Sanford Universi 82 /2/7

Mari rank For ransformaion marices, he rank ells ou he dimensions of he oupu E.g. if rank of A is, hen he ransformaion p Ap maps poins ono a line. Here s a mari wih rank : All poins ge mapped o he line 2 Sanford Universi 83 /2/7

Mari rank If an m m mari is rank m, we sa i s full rank Maps an m vecor uniquel o anoher m vecor An inverse mari can be found If rank < m, we sa i s singular A leas one dimension is geing collapsed. No wa o look a he resul and ell wha he inpu was Inverse does no eis Inverse also doesn eis for non-square marices Sanford Universi 84 /2/7

Ouline Vecors and marices Basic Mari Operaions Deerminans, norms, race Special Marices Transformaion Marices Homogeneous coordinaes Translaion Mari inverse Mari rank Eigenvalues and Eigenvecors(SVD) Mari Calculus Sanford Universi 85 /2/7

Eigenvecor and Eigenvalue An eigenvecor of a linear ransformaion A is a non-zero vecor ha, when A is applied o i, does no change direcion. Sanford Universi 86 /2/7

Eigenvecor and Eigenvalue An eigenvecor of a linear ransformaion A is a non-zero vecor ha, when A is applied o i, does no change direcion. Appling A o he eigenvecor onl scales he eigenvecor b he scalar value λ, called an eigenvalue. Sanford Universi 87 /2/7

Eigenvecor and Eigenvalue We wan o find all he eigenvalues of A: Which can we wrien as: Therefore: Sanford Universi 88 /2/7

Eigenvecor and Eigenvalue We can solve for eigenvalues b solving: Since we are looking for non-zero, we can insead solve he above equaion as: Sanford Universi 89 /2/7

Properies The race of a A is equal o he sum of is eigenvalues: Sanford Universi 9 /2/7

Properies The race of a A is equal o he sum of is eigenvalues: The deerminan of A is equal o he produc of is eigenvalues Sanford Universi 9 /2/7

Properies The race of a A is equal o he sum of is eigenvalues: The deerminan of A is equal o he produc of is eigenvalues The rank of A is equal o he number of non-zero eigenvalues of A. Sanford Universi 92 /2/7

Properies The race of a A is equal o he sum of is eigenvalues: The deerminan of A is equal o he produc of is eigenvalues The rank of A is equal o he number of non-zero eigenvalues of A. The eigenvalues of a diagonal mari D diag(d,... dn) are jus he diagonal enries d,... dn Sanford Universi 93 /2/7

Specral heor We call an eigenvalue λ and an associaed eigenvecor an eigenpair. The space of vecors where (A λi) is ofen called he eigenspace of A associaed wih he eigenvalue λ. The se of all eigenvalues of A is called is specrum: Sanford Universi 94 /2/7

Specral heor The magniude of he larges eigenvalue (in magniude) is called he specral radius Where C is he space of all eigenvalues of A Sanford Universi 95 /2/7

Specral heor The specral radius is bounded b infini norm of a mari: Proof: Turn o a parner and prove his! Sanford Universi 96 /2/7

Specral heor The specral radius is bounded b infini norm of a mari: Proof: Le λ and v be an eigenpair of A: Sanford Universi 97 /2/7

Diagonalizaion An n n mari A is diagonalizable if i has n linearl independen eigenvecors. Mos square marices (in a sense ha can be made mahemaicall rigorous) are diagonalizable: Normal marices are diagonalizable Marices wih n disinc eigenvalues are diagonalizable Lemma: Eigenvecors associaed wih disinc eigenvalues are linearl independen. Sanford Universi 98 /2/7

Diagonalizaion An n n mari A is diagonalizable if i has n linearl independen eigenvecors. Mos square marices are diagonalizable: Normal marices are diagonalizable Marices wih n disinc eigenvalues are diagonalizable Lemma: Eigenvecors associaed wih disinc eigenvalues are linearl independen. Sanford Universi 99 /2/7

Diagonalizaion Eigenvalue equaion: Where D is a diagonal mari of he eigenvalues Sanford Universi /2/7

Diagonalizaion Eigenvalue equaion: Assuming all λ i s are unique: Remember ha he inverse of an orhogonal mari is jus is ranspose and he eigenvecors are orhogonal Sanford Universi /2/7

Smmeric marices Properies: For a smmeric mari A, all he eigenvalues are real. The eigenvecors of A are orhonormal. Sanford Universi 2 /2/7

Smmeric marices Therefore: where So, if we waned o find he vecor ha: Sanford Universi 3 /2/7

Smmeric marices Therefore: where So, if we waned o find he vecor ha: Is he same as finding he eigenvecor ha corresponds o he larges eigenvalue. Sanford Universi 4 /2/7

Some applicaions of Eigenvalues PageRank Schrodinger s equaion PCA Sanford Universi 5 /2/7

Ouline Vecors and marices Basic Mari Operaions Deerminans, norms, race Special Marices Transformaion Marices Homogeneous coordinaes Translaion Mari inverse Mari rank Eigenvalues and Eigenvecors(SVD) Mari Calculus Sanford Universi 6 /2/7

Mari Calculus The Gradien Le a funcion ake as inpu a mari A of size m n and reurns a real value. Then he gradien of f: Sanford Universi 7 /2/7

Mari Calculus The Gradien Ever enr in he mari is: he size of A f(a) is alwas he same as he size of A. So if A is jus a vecor : Sanford Universi 8 /2/7

Eercise Eample: Find: Sanford Universi 9 /2/7

Eercise Eample: From his we can conclude ha: Sanford Universi /2/7

Mari Calculus The Gradien Properies Sanford Universi /2/7

Mari Calculus The Hessian The Hessian mari wih respec o, wrien or simpl as H is he n n mari of parial derivaives Sanford Universi 2 /2/7

Mari Calculus The Hessian Each enr can be wrien as: Eercise: Wh is he Hessian alwas smmeric? Sanford Universi 3 /2/7

Mari Calculus The Hessian Each enr can be wrien as: The Hessian is alwas smmeric, because This is known as Schwarzs heorem: The order of parial derivaives don maer as long as he second derivaive eiss and is coninuous. Sanford Universi 4 /2/7

Mari Calculus The Hessian Noe ha he hessian is no he gradien of whole gradien of a vecor (his is no defined). I is acuall he gradien of ever enr of he gradien of he vecor. Sanford Universi 5 /2/7

Mari Calculus The Hessian Eg, he firs column is he gradien of Sanford Universi 6 /2/7

Eercise Eample: Sanford Universi 7 /2/7

Eercise Sanford Universi 8 /2/7

Eercise Divide he summaion ino 3 pars depending on wheher: i k or j k Sanford Universi 9 /2/7

Eercise Sanford Universi 2 /2/7

Eercise Sanford Universi 2 /2/7

Eercise Sanford Universi 22 /2/7

Eercise Sanford Universi 23 /2/7

Eercise Sanford Universi 24 /2/7

Eercise Sanford Universi 25 /2/7

Eercise Sanford Universi 26 /2/7

Eercise Sanford Universi 27 /2/7

Eercise Sanford Universi 28 /2/7

Wha we have learned Vecors and marices Basic Mari Operaions Special Marices Transformaion Marices Homogeneous coordinaes Translaion Mari inverse Mari rank Eigenvalues and Eigenvecors Mari Calculae Sanford Universi 29 /2/7