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.
A pair of 2D points \(p\) and \(q\) have coordinates \(p = (p_x, p_y)\) and \(q = (q_x, q_y)\).
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):
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).
If \(u\) and \(v\) are unit vectors, then \(u \cdot v\) is the length of the projection of \(u\) onto \(v\), as depicted below. Hint: recall SOH-CAH-TOA from trigonometry.
Using your answers from #1 and #2, give a criterion that determines whether a point \(x\) lies to the left of the line from \(p\) to \(q\).
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\).
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.↩︎