Orthogonality. Orthonormal Bases, Orthogonal Matrices. Orthogonality

Similar documents
Lecture 3: Linear Algebra Review, Part II

Section 6.2, 6.3 Orthogonal Sets, Orthogonal Projections

Math 416, Spring 2010 More on Algebraic and Geometric Properties January 21, 2010 MORE ON ALGEBRAIC AND GEOMETRIC PROPERTIES

v = v 1 2 +v 2 2. Two successive applications of this idea give the length of the vector v R 3 :

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

Dot Products, Transposes, and Orthogonal Projections

6.1. Inner Product, Length and Orthogonality

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

MTH 2310, FALL Introduction

MASTER OF SCIENCE IN ANALYTICS 2014 EMPLOYMENT REPORT

The geometry of least squares

Math 261 Lecture Notes: Sections 6.1, 6.2, 6.3 and 6.4 Orthogonal Sets and Projections

Answer Key for Exam #2

15. LECTURE 15. I can calculate the dot product of two vectors and interpret its meaning. I can find the projection of one vector onto another one.

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34

(arrows denote positive direction)

Math 3191 Applied Linear Algebra

Math 3191 Applied Linear Algebra

Chapter 6: Orthogonality

Eigenvalues, Eigenvectors, and an Intro to PCA

Answer Key for Exam #2

Page 52. Lecture 3: Inner Product Spaces Dual Spaces, Dirac Notation, and Adjoints Date Revised: 2008/10/03 Date Given: 2008/10/03

MAT2342 : Introduction to Applied Linear Algebra Mike Newman, fall Projections. introduction

Eigenvalues, Eigenvectors, and an Intro to PCA

Span and Linear Independence

Applied Linear Algebra in Geoscience Using MATLAB

Quantitative Understanding in Biology Principal Components Analysis

STAT 151A: Lab 1. 1 Logistics. 2 Reference. 3 Playing with R: graphics and lm() 4 Random vectors. Billy Fang. 2 September 2017

APPLICATIONS The eigenvalues are λ = 5, 5. An orthonormal basis of eigenvectors consists of

4 ORTHOGONALITY ORTHOGONALITY OF THE FOUR SUBSPACES 4.1

Linear Models Review

1 Last time: determinants

There are two things that are particularly nice about the first basis

Solutions to Exam I MATH 304, section 6

Recall: Dot product on R 2 : u v = (u 1, u 2 ) (v 1, v 2 ) = u 1 v 1 + u 2 v 2, u u = u u 2 2 = u 2. Geometric Meaning:

Math 290-2: Linear Algebra & Multivariable Calculus Northwestern University, Lecture Notes

Lecture 10: Vector Algebra: Orthogonal Basis

Assignment 1 Math 5341 Linear Algebra Review. Give complete answers to each of the following questions. Show all of your work.

Vectors and Matrices Statistics with Vectors and Matrices

Linear Algebra, Summer 2011, pt. 3

Announcements Monday, November 20

22A-2 SUMMER 2014 LECTURE Agenda

18.06SC Final Exam Solutions

Dot Products. K. Behrend. April 3, Abstract A short review of some basic facts on the dot product. Projections. The spectral theorem.

Topic 14 Notes Jeremy Orloff

1 Dirac Notation for Vector Spaces

18.06 Professor Johnson Quiz 1 October 3, 2007

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Systems of Linear Equations

22 Approximations - the method of least squares (1)

MATH 221: SOLUTIONS TO SELECTED HOMEWORK PROBLEMS

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra 1/33

MITOCW ocw f99-lec17_300k

k is a product of elementary matrices.

Chapter 6. Orthogonality and Least Squares

LINEAR ALGEBRA KNOWLEDGE SURVEY

Vectors Year 12 Term 1

Math 18, Linear Algebra, Lecture C00, Spring 2017 Review and Practice Problems for Final Exam

Chapter 8. Rigid transformations

Problem # Max points possible Actual score Total 120

Linear Least-Squares Data Fitting

CS168: The Modern Algorithmic Toolbox Lecture #8: How PCA Works

Chapter 2 Notes, Linear Algebra 5e Lay

A Introduction to Matrix Algebra and the Multivariate Normal Distribution

1 0 1, then use that decomposition to solve the least squares problem. 1 Ax = 2. q 1 = a 1 a 1 = 1. to find the intermediate result:

Overview. Motivation for the inner product. Question. Definition

Sample Geometry. Edps/Soc 584, Psych 594. Carolyn J. Anderson

Orthogonal Complements

Section 2.2: The Inverse of a Matrix

Matrices and Deformation

MATH Linear Algebra

4.1 Distance and Length

Dot product and linear least squares problems

Vector Geometry. Chapter 5

. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in

Transpose & Dot Product

March 27 Math 3260 sec. 56 Spring 2018

Extreme Values and Positive/ Negative Definite Matrix Conditions

Eigenvalues, Eigenvectors, and an Intro to PCA

MATH 15a: Linear Algebra Practice Exam 2

Image Registration Lecture 2: Vectors and Matrices

Lecture 2: Linear Algebra Review

Stat 206: Linear algebra

Linear Algebra- Final Exam Review

. The following is a 3 3 orthogonal matrix: 2/3 1/3 2/3 2/3 2/3 1/3 1/3 2/3 2/3

Mathematics for Graphics and Vision

Game Engineering: 2D

Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination

Transpose & Dot Product

Answers in blue. If you have questions or spot an error, let me know. 1. Find all matrices that commute with A =. 4 3

February 20 Math 3260 sec. 56 Spring 2018

Applied Mathematics 205. Unit II: Numerical Linear Algebra. Lecturer: Dr. David Knezevic

Lecture 7. Econ August 18

Vector Spaces, Orthogonality, and Linear Least Squares

c 1 v 1 + c 2 v 2 = 0 c 1 λ 1 v 1 + c 2 λ 1 v 2 = 0

MA 1125 Lecture 15 - The Standard Normal Distribution. Friday, October 6, Objectives: Introduce the standard normal distribution and table.

Lecture 20: 6.1 Inner Products

Getting Started with Communications Engineering

Lecture 23: 6.1 Inner Products

Section 6.4. The Gram Schmidt Process

Transcription:

Orthonormal Bases, Orthogonal Matrices

The Major Ideas from Last Lecture Vector Span Subspace Basis Vectors Coordinates in different bases Matrix Factorization (Basics)

The Major Ideas from Last Lecture The span of basis vectors forms a vector space or a subspace. Initially, we think about elementary basis vectors For example, in 3-space (think x-,y-,z-axis), The span of any two of the elementary basis vectors forms a 2-dimensional subspace.

The Major Ideas from Last Lecture We don t always have to restrict ourselves to the elementary basis vectors. We ll want to derive new basis vectors (new variables) that somehow reveal hidden patterns in the data or give us a better low dimensional approximation. However, these new basis vectors (new variables) are just linear combinations of our elementary basis vectors (original variables).

An Orthonormal Basis The next concept we need is orthonormality. A collection of vectors is orthonormal if they are mutually orthogonal (orthogonal means perpendicular) and if every vector in the collection is a unit vector (i.e. has length 1: x 2 = 1). Easiest example? The elementary basis vectors!

Angle between vectors One way to measure how close vectors are to each other is to consider the angle between them. Do they point in the same direction? Opposite direction? y θ x The cosine of the angle between two vectors is given by the inner product of their unit vectors: cos(θ) = xt y x 2 y 2

Pearson s Correlation You may remember the formula for Pearson s correlation coefficient: n (x i x)(y i ȳ) i=1 r xy = n n (x i x) 2 (y i ȳ) 2 i=1 This is just the cosine between the centered variable vectors! i=1 cos(θ) = xt y x 2 y 2

Cosine Similarity The cosine of the angle between two vectors is an extremely common measure of similarity in text mining. Hopefully we ll get to talk more about that later!

So how do we know when two vectors are orthogonal (perpendicular)? When the angle between them is 90. You may recall that cos(90 ) = 0. cos(θ) = 0 xt y x 2 y 2 = 0 x T y = 0 Two vectors are orthogonal if and only if their inner product is zero. Orthogonal Completely Uncorrelated Independent

Let s Practice ( ) 1 1 What is the cosine of the angle between x = and 1 ( ) 1 y =? 0 1 0 2 Are the vectors v 1 = 1 and v 2 = 1 orthogonal? 1 1 Are they orthonormal? 3 What are the two conditions necessary for a collection of vectors to be orthonormal?

Orthonormal Basis If a set of basis vectors {v 1, v 2,..., v p } forms an orthonormal basis then it must be that: 1 v T i v j = 0 when i j. (i.e. mutually orthogonal) 2 v T i v i = 1 (i.e. each vector is a unit vector)

Orthogonal Matrix Suppose the columns of a matrix are mutually orthonormal: V = (v 1 v 2... v p ) Consider the matrix product V T V: v T 1 v T v T 1 v 1 v T 1 v 2 v T 1 v 3... v T 1 v p 2 v T V T V = v T 2 v 1 v T 2 v 2 v T 2 v 3... v T 2 v p 3 (v 1 v 2 v 3... v p ) = v T 3 v 1 v T 3 v 2 v T 3 v 3... v T 3 v p........ v T p v 1 v T p v 2 v T p v 3... v T p v p v T p

Orthonormal Columns Suppose the columns of a matrix are mutually orthonormal: V = (v 1 v 2... v p ) Consider the matrix product V T V: v T 1 1 0 0... 0 v T 2 0 1 0... 0 V T V = v T 3 (v 1 v 2 v 3... v p ) = 0 0 1... 0 = I p.......... 0 0 0... 1 v T p However, we can t say anything about VV T unless the matrix is square.

Orthogonal Matrix When a square matrix U has orthonormal columns, it also has orthonormal rows. Such a matrix is called an orthogonal matrix. Its inverse is equal to its transpose: U T U = UU T = I = U 1 = U T So to solve the system Ux = b, simply multiply by U T. x = U T b Nice and Easy!

Why an Orthonormal Basis? Two Conditions Two Reasons The basis vectors are mutually perpendicular. They are just rotations of the elementary basis vectors. Even in the new basis, we can still plot our data coordinates and examine them in a familiar way. Anything else would just be weird. The basis vectors have length 1. So when we look at the coordinates associated with each basis vectors, they tell us how many units to go in each direction. This way, we can essentially ignore the basis vectors and focus on the coordinates alone. We truly just rotated the axes.

Why an Orthonormal Basis? The basis vectors have length 1. So when we look at the coordinates associated with each basis vectors, they tell us how many units to go in each direction.

Why an Orthonormal Basis? Example: Orthogonal but not orthonormal basis. (2,3) v v 1 2 v 1 = ( ) 10 10 v 2 = ( ) 1 1

Why an Orthonormal Basis? What is the problem with the new coordinates? (2,3) v v 1 2 ( ) 2 = 0.25v 3 1 + 0.5v 2

Why an Orthonormal Basis? What is the problem with the new coordinates? Can I ignore the basis vectors and draw the point on a coordinate grid? span v 2 (0.25,0.5) span v 1 Is the point the same distance from the origin as it was before? Is it sensible that the coordinate along the direction v 2 is twice the coordinate along the direction v 1?

A basis which is not orthonormal will distort the data, while an orthonormal basis will merely rotate the data. 95% of dimension reduction methods create a new orthonormal basis for the data. Principal Components Analysis Singular Value Decomposition Factor Analysis Correspondence Analysis

Let s Practice 1 Let U = 1 3 1 2 0 2 2 2 0 1 0 0 3 0 2 1 0 2 a. Show that U is an orthogonal matrix. 1 b. Let b = 1 1. Solve the equation Ux = b. 1 1 2 Find two vectors which are orthogonal to x = 1 1

Why, Why, Why (aka The Major Ideas from Last Lecture) We don t always have to restrict ourselves to the elementary basis vectors. We ll want to derive new basis vectors (new variables) that somehow reveal hidden patterns in the data or give us a better low dimensional approximation. However, these new basis vectors (new variables) are just linear combinations of our elementary basis vectors (original variables).

Connection to Data Our (elementary) basis vectors are essentially our variable units. Suppose we have a plot of household income in thousands on the x-axis and SAT scores on the y-axis. Each point (vector) can be written as a linear combination of household income in thousands (e 1 ) and SAT score (e 2 ). The benefit of this vector space model? Interpretability.

Connection to Data Our (elementary) basis vectors are essentially our variable units. Suppose we have a plot of household income in thousands on the x-axis and SAT scores on the y-axis. Are there any drawbacks? It Depends!

Orthogonal Projections Think about taking a giant flashlight and shining all of the data onto a subspace at a right angle. The resulting shadow would be the orthogonal projection of the data onto the subspace. (Orthogonal just means Perpendicular!)

Orthogonal Projections/Components Easy to think about projection onto the elementary axes! span(e2) orthogonal projection of a onto e2 a orthogonal projection of a onto e1 span(e1)

Orthogonal Projections/Components When we drop a numeric variable, this is essentially what is happening. We had 2-dimensional data. We now have 1-dimensional data. We ve projected the data onto one of the basis vectors.

Orthogonal Projections/Components When we drop a numeric variable, this is essentially what is happening. We had 2-dimensional data. We now have 1-dimensional data. We ve projected the data onto one of the basis vectors (axes/variables).

Orthogonal Projections/Components When we drop a numeric variable, this is essentially what is happening. We had 2-dimensional data. We now have 1-dimensional data. We ve projected the data onto one of the basis vectors (axes/variables).

Changing the Basis What if we used a different set of axes? (i.e. new basis vectors...)

Rotation of same image, using new axes (variables/basis vectors)

Orthogonal Projections onto New Axis

Let s Practice 1 Draw the orthogonal {( )} projection of the points onto the 1 subspace span 1 B C A D F E

The Major Ideas from Today Cosine / Angle between vectors Orthonormality Orthonormal basis Orthogonal matrix Orthogonal projections