Symmetric matrices and dot products

Similar documents
Conceptual Questions for Review

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

Positive Definite Matrix

MATH 5720: Unconstrained Optimization Hung Phan, UMass Lowell September 13, 2018

Chapter 3 Transformations

Math 520 Exam 2 Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

MATH 1120 (LINEAR ALGEBRA 1), FINAL EXAM FALL 2011 SOLUTIONS TO PRACTICE VERSION

7. Symmetric Matrices and Quadratic Forms

A Brief Outline of Math 355

LINEAR ALGEBRA BOOT CAMP WEEK 4: THE SPECTRAL THEOREM

MATH 31 - ADDITIONAL PRACTICE PROBLEMS FOR FINAL

HOMEWORK PROBLEMS FROM STRANG S LINEAR ALGEBRA AND ITS APPLICATIONS (4TH EDITION)

Study Guide for Linear Algebra Exam 2

Math 215 HW #9 Solutions

A A x i x j i j (i, j) (j, i) Let. Compute the value of for and

Quadratic forms. Here. Thus symmetric matrices are diagonalizable, and the diagonalization can be performed by means of an orthogonal matrix.

Math Matrix Algebra

Review problems for MA 54, Fall 2004.

Warm-up. True or false? Baby proof. 2. The system of normal equations for A x = y has solutions iff A x = y has solutions

1 Last time: least-squares problems

Exercise Sheet 1.

Transpose & Dot Product

There are six more problems on the next two pages

The Singular Value Decomposition

6 EIGENVALUES AND EIGENVECTORS

MATH 423 Linear Algebra II Lecture 33: Diagonalization of normal operators.

Linear algebra I Homework #1 due Thursday, Oct Show that the diagonals of a square are orthogonal to one another.

Math Linear Algebra Final Exam Review Sheet

Transpose & Dot Product

Mathematical foundations - linear algebra

Linear Algebra And Its Applications Chapter 6. Positive Definite Matrix

Lecture 6 Positive Definite Matrices

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

Lecture 2 INF-MAT : , LU, symmetric LU, Positve (semi)definite, Cholesky, Semi-Cholesky

Math113: Linear Algebra. Beifang Chen

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

Maths for Signals and Systems Linear Algebra in Engineering

Chapter 4 Euclid Space

Week Quadratic forms. Principal axes theorem. Text reference: this material corresponds to parts of sections 5.5, 8.2,

MTH 2032 SemesterII

LINEAR ALGEBRA 1, 2012-I PARTIAL EXAM 3 SOLUTIONS TO PRACTICE PROBLEMS

Symmetric Matrices and Eigendecomposition

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

MATH 167: APPLIED LINEAR ALGEBRA Least-Squares

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

Tutorials in Optimization. Richard Socher

MATH 20F: LINEAR ALGEBRA LECTURE B00 (T. KEMP)

(a) If A is a 3 by 4 matrix, what does this tell us about its nullspace? Solution: dim N(A) 1, since rank(a) 3. Ax =

Linear Algebra Final Exam Study Guide Solutions Fall 2012

Solutions to Final Exam

Lecture 7 Spectral methods

Lecture 8 : Eigenvalues and Eigenvectors

Algebra Workshops 10 and 11

Notes on singular value decomposition for Math 54. Recall that if A is a symmetric n n matrix, then A has real eigenvalues A = P DP 1 A = P DP T.

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

1 Positive definiteness and semidefiniteness

Properties of Matrices and Operations on Matrices

A Review of Linear Algebra

This property turns out to be a general property of eigenvectors of a symmetric A that correspond to distinct eigenvalues as we shall see later.

Recall the convention that, for us, all vectors are column vectors.

MA 265 FINAL EXAM Fall 2012

B553 Lecture 5: Matrix Algebra Review

HW3 - Due 02/06. Each answer must be mathematically justified. Don t forget your name. 1 2, A = 2 2

Chapter 3. Matrices. 3.1 Matrices

Final Exam, Linear Algebra, Fall, 2003, W. Stephen Wilson

Math 118, Fall 2014 Final Exam

UNIT 6: The singular value decomposition.

Chap 3. Linear Algebra

Cheat Sheet for MATH461

Notes on Eigenvalues, Singular Values and QR

CS 246 Review of Linear Algebra 01/17/19

1. What is the determinant of the following matrix? a 1 a 2 4a 3 2a 2 b 1 b 2 4b 3 2b c 1. = 4, then det

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

8. Diagonalization.

q n. Q T Q = I. Projections Least Squares best fit solution to Ax = b. Gram-Schmidt process for getting an orthonormal basis from any basis.

Linear Algebra Primer

MATRICES ARE SIMILAR TO TRIANGULAR MATRICES

Throughout these notes we assume V, W are finite dimensional inner product spaces over C.

Nonlinear Programming Algorithms Handout

LINEAR SYSTEMS (11) Intensive Computation

Chapter 6: Orthogonality

Lecture 2 - Unconstrained Optimization Definition[Global Minimum and Maximum]Let f : S R be defined on a set S R n. Then

33AH, WINTER 2018: STUDY GUIDE FOR FINAL EXAM

(b) If a multiple of one row of A is added to another row to produce B then det(b) =det(a).

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

EXERCISES ON DETERMINANTS, EIGENVALUES AND EIGENVECTORS. 1. Determinants

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:

1 Overview. 2 A Characterization of Convex Functions. 2.1 First-order Taylor approximation. AM 221: Advanced Optimization Spring 2016

forms Christopher Engström November 14, 2014 MAA704: Matrix factorization and canonical forms Matrix properties Matrix factorization Canonical forms

Matrix decompositions

Ma/CS 6b Class 20: Spectral Graph Theory

Math Camp Lecture 4: Linear Algebra. Xiao Yu Wang. Aug 2010 MIT. Xiao Yu Wang (MIT) Math Camp /10 1 / 88

Real Symmetric Matrices and Semidefinite Programming

Mathematical foundations - linear algebra

Final Review Written by Victoria Kala SH 6432u Office Hours R 12:30 1:30pm Last Updated 11/30/2015

Chapter 7: Symmetric Matrices and Quadratic Forms

CS 143 Linear Algebra Review

Last Time. Social Network Graphs Betweenness. Graph Laplacian. Girvan-Newman Algorithm. Spectral Bisection

Review of Linear Algebra

Transcription:

Symmetric matrices and dot products Proposition An n n matrix A is symmetric iff, for all x, y in R n, (Ax) y = x (Ay). Proof. If A is symmetric, then (Ax) y = x T A T y = x T Ay = x (Ay). If equality holds for all x, y in R n, let x, y vary over the standard basis of R n. Corollary If A is symmetric and x, y are eigvecs corresponding to different eigvals λ, µ, then x y = 0. Proof. λx y = (Ax) y = x (Ay) = x (µy) = µx y, so (λ µ)(x y) = 0, but λ µ 0.

Proposition Every eigenvalue of a symmetric matrix (with real entries) is real, and we can pick the corresponding eigenvector to have real entries. Proof. Suppose A is symmetric and Ax = λx with x 0 (maybe with complex entries). Then Ax = Ax = λx, so λ(x x) = (Ax) x = x (Ax) = λ(x x) ; but x x is real and positive, so λ = λ. And if x is an eigvec with complex entries corr to λ, then we can multiply by some complex number and get at least one real nonzero entry, and then x + x is an eigvec corr to λ with real entries.

Lemma If A is a symmetric matrix with (real) eigvec x, then if y is perpendicular to x, then so is Ay (i.e., A multiplies the orthogonal complement (Rx) into itself). Proof. Let λ be the corr eigval. Because y x = 0, we have (Ay) x = y (Ax) = y (λx) = λ(y x) = 0.

Symmetrics have orthogonal diagonalization Theorem (Spectral Theorem) If A is symmetric, then there is an orthogonal matrix Q and a diagonal matrix Λ for which A = QΛQ T. Proof Let λ 1, x 1 be a real eigval and eigvec of A, with x = 1. Pick an orthonormal basis B for (Rx) ; then x, B form an orthonormal basis for R n. Use them as columns of an orthogonal matrix Q 1, with x 1 first; then because A multiplies (Rx) into itself, we have A = Q 1 [ λ1 0 0 A 2 Q T 1.

Because Q 1 [ λ1 0 0 A 2 Q T 1 = A = A T = Q 1 [ λ1 0 0 A T 2 Q T 1, A 2 is still symmetric; so we can repeat the process with A 2 ; and if [ λ2 0 A 2 = Q 2 Q2 T 0 A 3 then A = Q 1 [ 1 0 0 Q 2 λ 1 0 0 0 λ 2 0 0 0 A 3 [ 1 0 0 Q2 T Q T 1. Continuing, we get to the desired form.

Example For a symmetic A, R gives orthonormal eigenvectors (and eigenvalues in decreasing order).

Suppose we have A symmetric, Q = [ x 1... x n and Λ = diag(λ 1,..., λ n ) with A = QΛQ T. Write λ 1 0... 0 0 0... 0 0 0... 0 Λ =........ + + 0 0... 0....... 0 0... 0 0 0... λ n

Then λ 1 0... 0 0 0... 0 Q........ QT 0 0... 0 λ 1 0... 0 = [ 0 0... 0 x 1 x 2... x n........ 0 0... 0 x T 1 x T 2. x T n = λ 1 x 1 x T 1

And so on, so we get A = λ 1 x 1 x T 1 + λ 2 x 2 x T 2 + + λ n x n x T n. The x i x T i s are the projection matrices P i s on the subspaces Rx i s. (And they are rank 1 matrices.) Because they are the orthogonal projections onto an orthonormal basis, they add up to I if we apply them all to the same vector and add up the results, we ll get back the original vector.

Example: [ 9 2 A = 2 6 : λ 1 = 5, x 1 = [ 1/ 5 2/ 5 λ 2 = 10, x 2 = [ 2/ 5 1/ 5 and [ 1/5 2/5 2/5 4/5 [ 1/ 5 [ A = 5 2/ 1/ 5 2/ 5 5 [ 2/ 5 [ + 10 2/ 5 1/ 5 [ 1/5 2/5 = 5 2/5 4/5 [ + 1/ 5 [ + 10 4/5 2/5 2/5 1/5 4/5 2/5 2/5 1/5 = I.

Definition A quadratic form on R n is a function q : R n R given by a polynomial in which every term has degree 2: q(x) = i,j a i,jx i x j. Because x i x j = x j x i, we can assume a i,j = a j,i, and rewrite q(x) = x T Ax where A is symmetric. If q(x) > 0 for every nonzero x, then q and A are positive definite. If q(x) 0 for every x, then they are positive semidefinite.

Example 1 x1 2 + 2x2 2 3x3 2 4x 1 x 2 + x 1 x 3 + 2x 2 x 3 = x T 1 2 1/2 2 2 1 1/2 1 3 Because of the 3 on the main diagonal, this quadratic form is not even pos semidef (nor is its associated matrix): [ 0 0 1 1 2 1/2 2 2 1 1/2 1 3 0 0 1 = 3 Moral: If any main diagonal entry is 0, the matrix is not pos def. x

Example 2 Positive definite: (x + 3y) 2 + 4(2x y) 2 = 17x 2 10xy + 13y 2 = [ x y [ 17 5 5 13 [ x y Example 3 (x + 3y) 2 + 4(2y z) 2 + 2(2x + 3z) 2 = 9x 2 + 25y 2 + 22z 2 + 6xy 16yz + 24xz = [ x y z 9 3 12 x 3 25 8 y 12 8 22 z Certainly always nonnegative, but if x = 3y = 3z/2, all 3 squares are 0; so pos semidef.

Example 4 What about f (x, y, z) = 23x 2 + 14y 2 + 8z 2 28xy + 4xz + 32yz? f (x, y) = 23(x 2 + 4 23 xz + 4 529 z2 ) + 14(y 2 16 64 yz + 7 49 z2 ) ( + 8 4 23 128 ) z 2 28xy 7 = 23(x + 2 23 z)2 + 14(y 8 7 z)2 1684 161 z2 28xy. Can we make this negative for some x, y, z? Well, try setting x = (2/23)z and y = (8/7)z: That will make f into (1652/161)z 2, which is negative for any z 0. So f is not even pos semidef.

Application: Second Derivative Test Suppose z = f (x, y) is a function of two variables, and at a point (a, b) the first derivatives f / x and f / y are both 0. Then the Taylor series for f at that point is f (a, b) + 2 f x 2 (a, b)(x a)2 + 2 f (a, b)(x a)(y b) x y + 2 f y x (a, b)(y b)(x a) + 2 f y 2 (a, b)(y b)2 +... where the rest is higher-degree terms. So near (a, b), f behaves like the quadratic part, which is a quadratic form. When this form is positive definite, the smallest value f takes on in a small neighborhood of (a, b) at (a, b). In other words, (a, b) is a local minimum of f.

So it would be useful to have a quick way to decide whether the matrix is positive definite: [ 2 f (a, b) 2 f (a, b) 2 x 2 f y x (a, b) x y 2 f y 2 (a, b)

Theorem Let A be a symmetric matrix. TFAE: (a) All pivots of A are positive. (b) All upper left subdeterminants are positive. (This is Sylvester s criterion.) (c) All eigenvalues of A are positive. (d) The quadratic form x T Ax is positive definite. (This is the energy-based definition.) (e) A = R T R where R has independent columns. Proof (a) = (b): a 1,1 is first pivot, hence pos, and first subdet. By row ops, upper left subdets of A are equal to subdets of a matrix, say B, with the rest of the first column 0 s. Second entry on B s main diagonal is A s 2nd pivot; because it and a 1,1 are pos, B s 2nd upper left subdet is also pos. Etc.

(b) = (a): First subdet is a 1,1 > 0, first pivot. Repeat the rest of (a) = (b), except reversing causality: k-th pivot is pos because k k subdet is pos. (c) (d): Write A = QΛQ T ; then x T Ax = x T QΛQ T x = (Q T x) T Λ(Q T x) = i λ i y 2 i, where the y i s are the entries of Q T x. So if all the λ i s are positive, x T Ax is positive definite; while if one is negative, then there are x s for which x T Ax is negative. (c) = (e): Write A = QΛQ T. Then by (c), Λ makes sense and is invertible. Set R = Q ΛQ T. Then A = R T R, and the columns of R are independent. (e) = (d): Given A = R T R, x T Ax = (Rx) (Rx) = Rx 2 0. And if R has ind cols, then the only x with Rx 2 = 0 is x = 0.

(a) = (e): Because A is symmetric, (a) says it has an LDU-decomposition A = LDL T where L is lower triangular with 1 s on the main diagonal, and D is diagonal with the pivots of A on its diagonal. Set R = DL T. (d) = (b): Let b k = the upper left k k subdet of A, and c kj = the cofactor of a kj if we evaluate b k along its last row. Then for i < k, k j=1 a ijc kj is the value of the same det as b k except that its last row is equal to its i-th row, so it is 0; but k j=1 a kjc kj = b k. Note c kk = b k 1. We prove by induction (and pos defness) that all b k s are pos: Because A is pos def, b 1 = a 11 > 0. Assume b k 1 > 0. Set Then so b k > 0. x = (c k1, c k2,..., c kk, 0,..., 0). 0 < x T Ax = x T (0,..., 0, b k,?,...,?) = b k 1 b k,

Notes on proof: (e): The proof of (c) = (e) gives one square, in fact symmetric, R that works (the Cholesky decomposition), but any R with independent columns, even if not square, works. Example: A = R T R = [ 1 2 1 0 3 1 1 0 2 3 1 1 = [ 6 5 5 10 has independent columns, so A is positive definite. Therefore, the eigenvalues of A are all negative, so the solutions of du dt = Au approach 0 as t., and R (c): The (c) = (d) part of the proof shows us the right way to complete squares in quadratic forms. (Example, next page.)

Example 4, revisited: For f (x, y, z) = 23x 2 + 14y 2 + 8z 2 28xy + 4xz + 32yz, the matrix is 23 14 2 A = 14 14 16 = QΛQ T where 2 16 8 Q = 1/3 2/3 2/3 2/3 1/3 2/3 2/3 2/3 1/3 and Λ = 9 0 0 0 18 0 0 0 36, so x T Ax = x T QΛQ T x = (Q T x) T Λ(Q T x) = 9( 1 3 x + 2 3 y 2 3 z)2 + 18( 2 3 x + 1 3 y + 2 3 z)2 + 36( 2 3 x + 2 3 y + 1 3 z)2 ; again, not even pos semidef.

Proposition A symmetric matrix is positive semidefinite iff its eigenvalues are nonnegative, or equivalently iff it has the form R T R. Proof. Same as the positive definite case, except that, if the cols of R are not ind, there are nonzero x s for which Rx = 0.

Example 1 revisited: [ det[1 = 1, det x T 1 2 2 2 1 2 1/2 2 2 1 1/2 1 3 = 2, det x 1 2 1/2 2 2 1 1/2 1 3 = 5/2 Not even positive semidefinite. Eigenvalues from R: 3.5978953, 0.2047827, 3.3931126

Example 2 revisited: Positive definite: [ x y [ 17 5 5 13 [ x y [ 17 5 det[17 = 17, det 5 13 Eigenvalues from R: 20.385165, 9.614835 = 196

Example 3 revisited: det[9 = 9, (x + 3y) 2 + 4(2y z) 2 + 2(2x + 3z) 2 = 9x 2 + 25y 2 + 22z 2 + 6xy 16yz + 24xz = [ x y z 9 3 12 x 3 25 8 y 12 8 22 z [ 9 3 det 3 25 = 216, det 9 3 12 3 25 8 12 8 22 pos semidef. (Eigvals from R: 33.29150, 22.70850, 0.) = 0 ;

Example 4 re-revisited: 23x 2 + 14y 2 + 8z 2 28xy + 4xz + 32yz = x T Ax where 23 14 2 A = 14 14 16 2 16 8 det[23 = 23, [ det 23 14 14 14 = 126, det A = 5832, so not pos def. (We saw eigvals were 9, 18, 36.)

Application: Tilted Ellipses The equation of an ellipse in standard position is x 2 /a 2 + y 2 /b 2 = 1, i.e., [ x y [ 1/a 2 0 0 1/b 2 [ x y = 1. The semiaxes are a and b (the positive square roots of the reciprocals of the eigvals). But a rotation matrix Q gives a tilted ellipse. The axes are in the directions of the columns of Q.

Example 5 [ 1/16 0 Λ = 0 1/9 A = QΛQ T = [ 4/5 3/5, Q = 3/5 4/5 [ 288/3600 84/3600 84/3600 337/3600 : 1 16 x 2 + 1 9 y 2 = 1 288 3600 x 2 168 337 xy + 3600 3600 y 2 = 1

Example 6 Describe the ellipse 13x 2 6 3xy + 7y 2 = 4. Divide by 4: 13 4 x 2 3 3 2 xy + 7 4 y 2 = 1 The quadratic form has matrix [ 13/4 3 3/4 A = 3 = QΛQ T 3/4 7/4 where [ Q = 1/2 3/2 3/2 1/2, Λ = [ 1 0 0 4 So the ellipse has axes tilted 60 from the xy-axes, with half-lengths 1 and 1/2..

Example 7 Describe the ellipse x 2 + 6xy + 4y 2 = 16. The matrix of the quadratic form is [ 1/16 3/16 A = 3/16 1/4, and R shows that its eigvals are 0.35688137 and 0.05338137. The negative eigenvalue means that it is not an ellipse. The graph of the quadratic form z = (x 2 + 6xy + 4y 2 )/16 is a saddle, and the cross section z = 1 is a hyperbola. Or, [ 1/16 3/16 det[1/16 = 1/16, det 3/16 1/4 = 5/256 < 0