**Section 6.3**

**Orthogonal Matrices**

`> `
**with(linalg):**

Warning, the protected names norm and trace have been redefined and unprotected

`> `

**Orthogonal Matrices**

An
*nxn*
matrix is said to be an
orthogonal matrix
if its columns form an orthonormal set.

**Example 1:**
Consider the orthonormal basis of

`> `
**u1:=vector([3/5,4/5,0]);
u2:=vector([-4/5,3/5,0]);
u3:=vector([0,0,1]);**

`> `

Construct the matrix whose columns are the vectors

`> `
**A:=augment(u1,u2,u3);**

`> `

The columns of this matrix form an orthonormal set. Thus A is called an

**Orthogonal Matrix **

Let us study some of its properties :

Take for example the transpose of A

`> `
**trA:=transpose(A);**

`> `

What is the product of A and ?

`> `
**AtrA=multiply(A,trA);**

`> `

What is the determinant of the matrix A?

What is the inverse of the orthogonal matrix A?

*********************************************************************

In general, an orthogonal matrix has the following properties:

1. Its inverse is equal to its transpose, i.e. and

2. Its determinant is equal to +1 or -1.

3. The rows of form an orthonormal basis for

4. The columns of form an orthonormal basis for

*********************************************************************

**Example 2: **
Preservation of dot products, norms and angles.

`> `
**x:=vector([1, -1, 2]);
y:=vector([-2, 1, 3]);**

Dot product of x and y:

`> `
**innerprod(x,y);**

Dot product of Ax and Ay:

`> `
**innerprod(multiply(A,x),multiply(A,y));**

Norm of x and Ax:

`> `
**`||x||`=sqrt(innerprod(x,x));**

`> `
**`||Ax||`=sqrt(innerprod(multiply(A,x),multiply(A,x)));**

Angle between x and y is the same as the angle between Ax and Ay.

*********************************************************************

Eigenvectors of a real symmetric matrix that correspond to different eigenvlaues are orthogonal.

Moreover, every symmetric matrix is diagonalizable, where can be chosen to

be an orthogonal matrix. Hence, .

*********************************************************************

**Example 3: **
Consider the matrix

`> `

`> `
**A:=matrix([[0,1,1],[1,2,1],[1,1,0]]);**

`> `

`> `

`> `
**eigenvals(A);**

`> `
**eigenvects(A);**

Eigenvectors are given as:

`> `
**v1 := vector([1,-1,1]);
v2 := vector([1,2,1]);
v3 := vector([-1,0,1]); **

Construct matrix C whose columns are the vectors

`> `
**C := augment(v1,v2,v3);**

`> `

Product with C

`> `
**multiply(transpose(C),C);**

`> `

`> `

We want this product to be equal to I. Want is wrong? The columns do not

have length 1.

`> `
**C := augment(v1/sqrt(3),v2/sqrt(6),v3/sqrt(2));**

`> `

`> `
**multiply(transpose(C),C);**

`> `

Product

`> `

`> `

`> `

`> `
**multiply(transpose(C),A,C);**

`> `

`> `

**Exercises**

1-17 odd.