Link to this document's Jupyter Notebook

In order to successfully complete this assignment you must do the required reading, watch the provided videos and complete all instructions. The embedded survey form must be entirely filled out and submitted on or before 11:59pm on on the day before class. Students must come to class the next day prepared to discuss the material covered in this assignment.


Readings for this topic (Recommended in bold)

Pre-Class Assignment: Projections

Goals for today's pre-class assignment

Read Section 4.6 of the textbook. </p>

  1. Orthogonal and Orthonormal
  2. Code Review
  3. Gram-Schmidt
  4. Assignment Wrap-up

1. Orthogonal and Orthonormal

Definition: A set of vectors is said to be orthogonal if every pair of vectors in the set is orthogonal (the dot product is 0). The set is orthonormal if it is orthogonal and each vector is a unit vector (norm equals 1).

Result: An orthogonal set of nonzero vectors is linearly independent.

Definition: A basis that is an orthogonal set is called an orthogonal basis. A basis that is an orthonormal set is called an orthonormal basis.

Result: Let $\{u_1,\dots,u_n\}$ be an orthonormal basis for a vector space $V$. Then for any vector $v$ in $V$, we have $$v=(v\cdot u_1)u_1+(v\cdot u_2)u_2 +\dots + (v\cdot u_n)u_n$$

Definition: A square matrix is orthogonal is $A^{-1}=A^\top$.

Result: Let $A$ be a square matrix. The following three statements are equivalent.

(a) $A$ is orthogonal.

(b) The column vectors of $A$ form an orthonormal set.

(c) The row vectors of $A$ form an orthonormal set.

(d) $A^{-1}$ is orthogonal.

(e) $A^\top$ is orthogonal.

Result: If $A$ is an orthogonal matrix, then we have $|A|=\pm 1$.

Consider the following vectors $u_1, u_2$, and $u_3$ that form a basis for $R^3$.

$$ u_1 = (1,0,0)$$$$ u_2 = (0, \frac{1}{\sqrt(2)}, \frac{1}{\sqrt(2)})$$$$ u_3 = (0, \frac{1}{\sqrt(2)}, -\frac{1}{\sqrt(2)})$$

DO THIS: Show that the vectors $u_1$, $u_2$, and $u_3$ are linearly independent (HINT: see the pre-class for 0219-Change_Basis):

Put your answer to the above here

QUESTION 1: How do you show that $u_1$, $u_2$, and $u_3$ are orthogonal?

Put your answer to the above question here

QUESTION 2: How do you show that $u_1$, $u_2$, and $u_3$ are normal vectors?

Put your answer to the above question here

DO THIS: Express the vector $v = (7,5,-1)$ as a linear combination of the $u_1$, $u_2$, and $u_3$ basis vectors:


2. Code Review

In the next in-class assignment, we are going to avoid some of the more advanced libraries ((i.e. no numpy or scipy or sympy) to try to get a better understanding about what is going on in the math. The following code implements some common linear algebra functions:

DO THIS: Write a quick test to compare the output of the above dot function with the numpy dot function.

DO THIS: Write a quick test to compare the output of the above multiply function with the numpy multiply function.

QUESTION: What is the big-O complexity of the above multiply function?

Put your answer to the above question here.

QUESTION: Line 11 in the provided multiply code initializes a matrix of the size of the output matrix as a list of lists with zeros. What is the big-O complexity of line 11?

Put your answer to the above question here.

DO THIS: Write a quick test to compare the outputs of the above norm function with the numpy norm function.

DO THIS: Write a quick test to compare the output of the above transpose function with the numpy transpose function.

QUESTION: What is the big-O complexity of the above transpose function?

Put your answer to the above question here

QUESTION: Explain any differences in results between the provided functions and their numpy counterparts.

Put your answer to the above question here


3. Gram-Schmidt

Watch this video for the indroduction of Gram-Schmidt, which we will implement in class.


4. Assignment wrap-up

Please fill out the form that appears when you run the code below. You must completely fill this out in order to receive credit for the assignment!

Direct Link to Google Form

If you have trouble with the embedded form, please make sure you log on with your MSU google account at googleapps.msu.edu and then click on the direct link above.

Assignment-Specific QUESTION: How do you show that $u_1$, $u_2$, and $u_3$ are orthogonal?

Put your answer to the above question here

QUESTION: Summarize what you did in this assignment.

Put your answer to the above question here

QUESTION: What questions do you have, if any, about any of the topics discussed in this assignment after working through the jupyter notebook?

Put your answer to the above question here

QUESTION: How well do you feel this assignment helped you to achieve a better understanding of the above mentioned topic(s)?

Put your answer to the above question here

QUESTION: What was the most challenging part of this assignment for you?

Put your answer to the above question here

QUESTION: What was the least challenging part of this assignment for you?

Put your answer to the above question here

QUESTION: What kind of additional questions or support, if any, do you feel you need to have a better understanding of the content in this assignment?

Put your answer to the above question here

QUESTION: Do you have any further questions or comments about this material, or anything else that's going on in class?

Put your answer to the above question here

QUESTION: Approximately how long did this pre-class assignment take?

Put your answer to the above question here


Congratulations, we're done!

Course Resources:


Written by Dr. Dirk Colbry, Michigan State University Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.