CSCI 480 / 580 - Written Homework 0

Complete the following problems and submit your solutions to the HW1 assignment on Canvas. For all questions, justify your answers either or showing your work or giving a brief explanation. Please typeset your solutions using latex or similar1. You may work with your classmates on these problems, but you must write up your own solutions individually without using notes or photos made during your collaborative discussions. This is new material, so please let me know if you think anything is unclear or ambiguous and I’ll make corrections or clarifications as needed.

  1. A pair of 2D points \(p\) and \(q\) have coordinates \(p = (p_x, p_y)\) and \(q = (q_x, q_y)\).

    1. In terms of the scalar coordinates (\(p_x, p_y, q_x, q_y\)), give the components of the vector \(\mathbf{v}\) that points from \(p\) to \(q\).
    2. Using vector notation (i.e., in terms of only \(p\) and \(q\)), give an expression for the same vector.
    3. In terms of scalar coordinates, this question aims to find an expression for a vector that is orthogonal (i.e., perpendicular) to the vector from the prior two parts. Such a vector could have any length (except zero) and could point one of two directions. To disambiguate, you should give the vector whose length is the same as \(\mathbf{v}\)’s’ and direction points to the left of \(\mathbf{v}\) (i.e., if \(\mathbf{v}\) pointed North, your answer vector would point West).
  2. The dot product of two vectors is denoted \(u \cdot v\), or can be alternately phrased as as a matrix multiplication \(u^T v\) because the multiplication of a (say) \(3 \times 1\) matrix (\(u^T\)) with a \(1 \times 3\) matrix (\(v\)) results in a \(1 \times 1\) matrix, which treated as a scalar is the same as the dot product of the two vectors. The dot product has a lot of neat properties, but here’s one: \[ u \cdot v = ||u||\ ||v|| \cos \theta \] where \(||\cdot||\) is the length, or norm, operator and \(\theta\) is the angle between the two vectors. This works both in 2 and 3 dimensions.

    Using the above property, prove that the following properties are also true (assume neither vector has length zero):

    1. The dot product is zero if \(u\) and \(v\) are orthogonal; positive if \(u\) and \(v\) point in the same general direction (i.e., \(\cos \theta\) is acute), and negative if they point opposite (i.e., \(\cos \theta\) is obtuse).

    2. If \(u\) and \(v\) are unit vectors, then the length of the projection of \(u\) onto \(v\), denoted as \(x\) in the diagram below, is equal to \(u \cdot v\). Hint: recall SOH-CAH-TOA from trigonometry.

    3. Give a criterion that determines whether a point \(x\) lies to the left of the line from \(p\) to \(q\). Hint: Feel free to rely on results from any prior problems in this homework.

  3. A basis is a set of vectors that span a space. For example, when writing the coordinates of a 2D point (i.e., a point in \(\mathbb{R}^2\)) we’re implicitly expressing that point’s location in terms of a canonical basis whose basis vectors are \(\hat{i} = [1, 0]^T\) (i.e., how far you have to go along the \(x\) axis to reach the point; the \(x\) coordinate) and \(\hat{j} = [0, 1]^T\) (i.e., how far you have to go along the \(y\) axis to reach the point; the \(y\) coordinate).

    Express the point \((4, 4)\) in the coordinates of a basis whose vectors are \(u = [1, 0]^T\) and \(v = [-1, 1]^T\).


  1. My approach to writing writing documents like this one is to use Markdown and include Latex-style math inline (e.g., $\frac{a}{b}$). Then, I use pandoc to convert to either HTML or PDF, which renders the math nicely. You can also find WYSIWYG Markdown editors that make the editing process nicer and allow you to export straight to PDF. You can download the markdown source for this document here.↩︎