Orthogonal and Symmetric Matrices
In questa pagina 5
This note continues Euclidean SpacesA scalar product gives vectors a length and an orthogonality relation; with it every subspace has an orthogonal complement, vectors can be projected orthogonally, and Gram-Schmidt builds orthonormal bases.Euclidean Spaces → (scalar product on , norm, orthogonal projection) and uses Eigenvalues and EigenvectorsAn eigenvector of a square matrix is a nonzero vector that the matrix only rescales; eigenvalues are the roots of the characteristic polynomial, and a matrix is diagonalizable exactly when the eigenspaces together have dimension n.Eigenvalues and Eigenvectors →.
1. Orthogonal matrices
Definition. A real square matrix is orthogonal if This is equivalent to: is invertible and .
Lemma (why the name). For the following are equivalent:
- is orthogonal;
- the rows of are an orthonormal basis of ;
- the columns of are an orthonormal basis of .
Proof. If is the -th standard basis vector, is the -th column of . Then The vector is the -th column of , and is the -th entry of that vector, i.e. the entry . Hence "the columns are orthonormal" (this scalar product equals for and for ) says exactly . For square matrices (each says is the inverse of ), which gives (1)(3); applying this to gives (1)(2) (the rows of are the columns of , and is orthogonal iff is). Orthonormal vectors are linearly independent, so of them form a basis.
Remark. The matrix whose columns are an orthonormal basis is therefore orthogonal, and its inverse is obtained for free as its transpose.
2. Symmetric matrices and orthogonal diagonalization
Theorem (principal axes theorem). The following are equivalent for an matrix :
- is symmetric ();
- is orthogonally diagonalizable: there is an orthogonal matrix such that is diagonal;
- has an orthonormal eigenbasis (an eigenbasis of that is also an orthonormal basis).
If these conditions hold, the columns of form an orthonormal eigenbasis, and vice versa. Note that is obtained without computing an inverse.
(For (2) the columns of are the eigenvectors, so here plays the role of the matrix of eigenvectors of the previous note; .)
The implication (1)(2) in particular says: a symmetric matrix is diagonalizable. The vectors of an orthonormal eigenbasis are also called the principal axes of . The easy parts are (2)(3) (this is the earlier lemma "diagonalizable eigenbasis" together with the orthogonal-matrix lemma above: the columns of are orthonormal) and (2)(1): if then and . The difficult direction is (1)(2); one proves it by showing that a symmetric real matrix has only real eigenvalues (as opposed to complex ones); its full proof is not given in these notes (see the cited reference in the course text).
The case. The characteristic polynomial of a symmetric matrix is with zeros The expression under the root is always non-negative, so are real. By contrast, the non-symmetric matrix has the imaginary eigenvalues (see Eigenvalues and EigenvectorsAn eigenvector of a square matrix is a nonzero vector that the matrix only rescales; eigenvalues are the roots of the characteristic polynomial, and a matrix is diagonalizable exactly when the eigenspaces together have dimension n.Eigenvalues and Eigenvectors →).
Proposition (eigenvectors of distinct eigenvalues). Let be symmetric and two distinct eigenvalues with eigenvectors and respectively. Then .
Proof. Using : Hence , and since , .
So for a symmetric matrix with distinct eigenvalues the eigenvectors are automatically orthogonal; it remains only to normalize them. (For a repeated eigenvalue one orthonormalizes a basis of the eigenspace with Gram-Schmidt; vectors from different eigenspaces are orthogonal anyway.)
Example 1 (a matrix). Which of and is orthogonally diagonalizable? By the theorem, exactly the symmetric ones, so both are. is already diagonal: , and is an orthonormal eigenbasis. For : the eigenvalues are , i.e. and .
- has kernel spanned by (eigenvalue );
- has kernel spanned by (eigenvalue ).
They are orthogonal: , but not normal. An orthonormal eigenbasis is
Example 2 (a matrix). is symmetric. Its characteristic polynomial is , and eigenvalues with eigenvectors are
- , ;
- , ;
- , .
(Check, e.g. .) These three vectors are orthogonal, as one sees by direct computation, or, since the eigenvalues are distinct, automatically by the proposition above. They are not normal; dividing by the norms gives an orthonormal eigenbasis:
With the matrix having these columns, is orthogonal and .
3. Affine subspaces
Definition. Let be a vector space. An affine subspace of is a subset of the form for a vector and a subspace .
That is, an affine subspace is a subspace translated by a vector. Lines and planes in not necessarily through the origin are affine subspaces. A key example: the solution set of a (not necessarily homogeneous) linear system is an affine subspace (a particular solution plus the kernel of ).
Lemma. Let be an affine subspace. If also with and a subspace , then and . In other words, is uniquely determined by .
Proof. Since , we have ; since , we have , hence as well. Then where we used that for a subspace and , .
So the dimension of an affine subspace is well defined: for .
Relative position. Let be affine subspaces with associated subspaces .
- intersects if ;
- is parallel to if or ;
- is skew to if and .
Example (skew lines). and . The vectors and are linearly independent, so the lines are not parallel. For an intersection point we need . The first two equations give and , which is impossible. So and the lines are skew.
3.1 Closest point to the origin
Definition. For affine subspaces , points , realize the minimal distance of and if for all , . We then write .
Proposition. Let be an affine subspace of a Euclidean space . There is a unique vector characterized by either of the following equivalent properties:
- is the (only) element of ;
- realizes the minimal distance of the origin to .
It is given by the projection of onto the orthogonal complement .
Proof. contains : by the projection theorem write with uniquely determined and . Then and .
contains only : if , then with , so ; also , hence and .
realizes the minimal distance: let be any point. Then (both and lie in ), and
No other point does: if has , the same computation gives , so , i.e. .
W-perp
|
v0 = w + v | v0 + W (affine subspace X, parallel to W)
*.....*---------------
/ /|
/ / | v = p_{W-perp}(v0): closest point of X to O
O-----*---> W w = p_W(v0)3.2 Hyperplanes
Definition. A hyperplane in is an affine subspace of dimension (so ). A line is a hyperplane in ; a plane is a hyperplane in .
Proposition. Let , , and . Then is a hyperplane, and its distance to the origin is
Proof. The equation , i.e. , is a non-homogeneous linear system whose matrix has rank since , so the solution set has dimension . The associated subspace is , and for some (structure of solution sets of linear systems). Clearly . Put ; then so ; and . So and by the previous proposition it is the point of closest to the origin: .
Proposition (Hesse normal form). Let be a hyperplane that does not contain the origin, and . Then there is a unique vector with
- ,
- (a normal vector of ),
- .
It is , where is the unique element of (equivalently the point of closest to the origin). The equation is the Cartesian equation of the hyperplane.
Example. Take , (computed in Euclidean SpacesA scalar product gives vectors a length and an orthogonality relation; with it every subspace has an orthogonal complement, vectors can be projected orthogonally, and Gram-Schmidt builds orthonormal bases.Euclidean Spaces →) and the plane with . To find write with , , i.e. The coefficient matrix has inverse and the unique solution is So (this can be double-checked as ) and This is the point of closest to the origin, at distance . The unit normal is , and the Cartesian equation reads, multiplying by , .
3.3 Lines in
A line can be described in two ways.
Parametric (vector) equations. for vectors : the points are , ; componentwise is the direction vector of the line.
Cartesian equations. A system of two equations (i.e. and ), with linearly independent. Each equation is a plane (a hyperplane in ), and the line is the intersection of the two planes.
From parametric to Cartesian: eliminate the parameter . From Cartesian to parametric: solve the linear system.
Example (Cartesian to parametric). The equations , define a line. Row reduction of gives , . So
Example (parametric to Cartesian). has parametric equations , , . Since , the other two read and , i.e. or equivalently and .
Planes containing a line. The planes containing (given by , ) are exactly those with equation Indeed this describes a (hyper)plane, and if then it satisfies both given equations and so also their linear combination.
Example. , i.e. and (equivalently ). The planes containing are and the vectors are precisely those orthogonal to the direction .
Plane through parallel to another line. Given another line , the line is parallel to a plane through exactly if . Continuing the example, let , i.e. . We need , which gives with arbitrary. So the plane , i.e. , contains and is parallel to .
4. Distance between two affine subspaces
Theorem. Let and be affine subspaces. Put and , and let be the orthogonal projection of onto . For points , the following are equivalent:
- ;
- ;
- and realize the minimal distance of and , i.e. ;
- is orthogonal to and to (i.e. to every and ).
In particular intersects if and only if (then ).
Proof. (1)(2) is obvious since .
(3)(2): write , with arbitrary , . Then The vector is an arbitrary vector of (note also ranges over ). So we seek with minimal, i.e. the point of the affine subspace closest to the origin. By the closest-point proposition this distance is , attained exactly when . This shows (3)(2).
(3)(4): if realize the minimal distance, then in particular is the point of nearest to . By the closest-point proposition (applied to ) is orthogonal to . Exchanging the roles of and , is orthogonal to .
(4)(1): the assumption gives (a vector is orthogonal to precisely if it is orthogonal to and to , by bilinearity). From we get By uniqueness of the decomposition of as a vector in plus a vector in , .
Finally .
Example. Consider two lines in : General points: and , so Use criterion (4): must be orthogonal to and to : Adding the equations gives , i.e. , and then . The minimizing points are and , with (The lines are skew: the directions , are independent and the distance is not .)
5. Summary of computational methods
Task 1. Convert a line from Cartesian to parametric form. Pick two distinct points satisfying the Cartesian equations; then . Other choices of points give other vector equations, but the direction vectors are nonzero multiples of each other (by the uniqueness Lemma).
Task 2. Convert a line from parametric to Cartesian form. Express one coordinate in terms of the free parameter and substitute into the other coordinate equations.
Task 3. Plane through three non-collinear points . Write ; compute a normal vector to (i.e. a generator of its orthogonal complement) and write the corresponding Cartesian equation.
Task 4. Plane containing a line and a point . Choose two distinct points and apply Task 3 to .
Task 5. Given a plane , a line and a point , find the line through orthogonal to . Write and impose and , i.e. (compute as in Task C of Euclidean SpacesA scalar product gives vectors a length and an orthogonality relation; with it every subspace has an orthogonal complement, vectors can be projected orthogonally, and Gram-Schmidt builds orthonormal bases.Euclidean Spaces →).
Task 6. Cartesian equation of a plane . Compute and , choose a nonzero and set . The representation is not unique: another has and for some .
Task 7. Are two lines parallel? In parametric form , : check whether are linearly dependent. If the lines are given by Cartesian equations convert first (Task 1).
Task 8. Are two lines skew? Check (a) linearly independent and (b) (for (b) it is often convenient to use Cartesian equations).
Task 9. Is a line parallel to a plane ? If : is a linear combination of ? If : is ?
Task 10. Is the line orthogonal to the plane? If : are linearly dependent? If : is and ?
Task 11. Distance of two affine subspaces , (also for points, ). Either:
- apply the theorem via (1): compute , , , take general points , and solve the linear system ; or
- apply the theorem via (4): take general points , and solve the homogeneous linear system , , with running over a spanning set of and over a spanning set of . (This is what the example above does.)
Versione ripasso
Orthogonal matrix. , i.e. invertible with . Equivalent: the rows form an orthonormal basis of ; equivalent: the columns form an orthonormal basis. (Proof: .)
Principal axes theorem. For an real matrix, equivalent:
- symmetric ();
- orthogonally diagonalizable: with orthogonal;
- has an orthonormal eigenbasis (the columns of ).
Hard direction: symmetric diagonalizable, because a symmetric real matrix has only real eigenvalues (for : , real). In particular symmetric matrices are always diagonalizable.
- Eigenvectors of distinct eigenvalues of a symmetric matrix are orthogonal: . Method: eigenvalues, eigenvectors, orthogonalize inside each eigenspace if it has dimension , normalize.
- Examples: has orthonormal eigenbasis (eigenvalue ), (eigenvalue ); has eigenvalues with eigenvectors .
Affine subspaces. , with uniquely determined (the direction space); . Solution set of . Relative position: intersecting (), parallel ( or ), skew ( and ).
Closest point to origin. For : the unique point of , equal to ; for .
Hyperplanes. , : dimension , distance to origin , closest point . Hesse normal form: unit , equation with . Cartesian equation of a plane : , .
Lines in . Parametric ; Cartesian: two plane equations. Planes through : . Parallel directions dependent; skew directions independent and no common point.
Distance of two affine subspaces , : , , ; minimal distance , realized exactly by with , equivalently and . Intersect . Method: general points , , impose orthogonality to all directions, solve.
Typical mistakes.
- Calling a matrix orthogonal when the columns are orthogonal but not of norm .
- Using : for orthogonal the inverse is the transpose; not so for a general matrix of eigenvectors.
- Forgetting to normalize eigenvectors, or to orthogonalize inside an eigenspace of dimension .
- Expecting orthogonal eigenvectors for a non-symmetric matrix (the orthogonality needs ).
- Lines in : calling two non-parallel lines "intersecting" without checking they actually meet (they may be skew).
- Distance formula : valid for with any ; with a unit normal it is just .