Skip to main content

Section 6.1 Dot Product, Length, and Orthogonality

Handout 6.1 Dot Product, Length, and Orthogonality

Motivating Question
For a matrix \(A\text{,}\) which vectors are orthogonal to all the rows of \(A\text{?}\) To the columns of \(A\text{?}\)

Definition 6.1. Dot Product.

The dot product of two vectors \(\vec u,\vec v\in\mathbb{R}^n\) is:
\begin{equation*} \vec u\cdot\vec v = \vec u^T\vec v = \begin{bmatrix} u_1 \amp u_2 \amp \cdots \amp u_n \end{bmatrix}\begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix} = u_1v_1+u_2v_2+\cdots+u_n v_n. \end{equation*}

Example 6.2.

For what values of \(k\) is \(\vec u\cdot\vec v=0\text{?}\)
\begin{equation*} \vec u=\begin{bmatrix}-1\\3\\k\\2\end{bmatrix},\qquad \vec v=\begin{bmatrix}4\\2\\1\\-3\end{bmatrix}. \end{equation*}

Definition 6.4. Length (Magnitude).

The length, or magnitude, of \(\vec u\in\mathbb{R}^n\) is
\begin{equation*} \|\vec u\|=\sqrt{\vec u\cdot\vec u} = \sqrt{u_1^2+u_2^2+\cdots+u_n^2}. \end{equation*}

Example 6.5.

Compute \(\lVert\overrightarrow{OP}\rVert\) where \(P=(1,3,2)\text{.}\)
Sketch of the point (1,3,2) in 3-space.

Example 6.6.

Let \(\lVert\vec u\rVert=5\text{,}\) \(\lVert\vec v\rVert=\sqrt{3}\text{,}\) and \(\vec u\cdot\vec v=-1\text{.}\) Compute \(\lVert\vec u+\vec v\rVert\text{.}\)
For any vector \(\vec v\) and scalar \(c\text{,}\)
\begin{equation*} \| c\vec v\| = \lvert c\rvert\|\vec v\|. \end{equation*}

Definition 6.7. Unit Vector.

A vector of length 1 is called a unit vector.
Examples of unit vectors:
\begin{equation*} \vec e_1=\begin{bmatrix}1\\0\end{bmatrix},\quad \vec y=\frac{1}{\sqrt{5}}\begin{bmatrix}1\\2\end{bmatrix},\quad \vec v=\frac{1}{3}\begin{bmatrix}2\\1\\2\end{bmatrix}. \end{equation*}

Definition 6.8. Distance.

For \(\vec u,\vec v\in\mathbb{R}^n\text{,}\) the distance between them is
\begin{equation*} \operatorname{dist}(\vec u,\vec v)=\lVert\vec u-\vec v\rVert. \end{equation*}

Example 6.9.

Compute the distance between \(\vec u=\begin{bmatrix}7\\1\end{bmatrix}\) and \(\vec v=\begin{bmatrix}3\\2\end{bmatrix}\text{.}\)

Definition 6.10. Orthogonal Vectors.

Two vectors \(\vec u,\vec v\) are orthogonal if \(\vec u\cdot\vec v=0\text{.}\)
This is equivalent to
\begin{equation*} \| \vec u+\vec v\|^2 = \|\vec u\|^2 + \|\vec v\|^2. \end{equation*}
The zero vector is orthogonal to every vector in \(\mathbb{R}^n\text{.}\)

Example 6.11.

Sketch the set of all vectors orthogonal to \(\vec v=\begin{bmatrix}3\\2\end{bmatrix}\text{.}\)
Sketch of the vector v in coordinate plane.

Definition 6.12. Orthogonal Complement.

If \(W\) is a subspace of \(\mathbb{R}^n\text{,}\) a vector \(\vec z\) is orthogonal to \(W\) if \(\vec z\cdot\vec w=0\) for every \(\vec w\in W\text{.}\) The set of all such vectors is the orthogonal complement:
\begin{equation*} W^\perp=\{\vec z\in\mathbb{R}^n:\vec z\cdot\vec w=0 \;\text{for all}\; \vec w\in W\}. \end{equation*}
The set \(W^\perp\) is also a subspace of \(\mathbb{R}^n\text{.}\) We have that
\begin{equation*} \dim(W) + \dim(W^\perp) = n\text{.} \end{equation*}
Furthermore, for any subspace \(W\text{,}\) we have that \(\left(W^\perp\right)^\perp = W\text{.}\)

Example 6.13.

Suppose \(A=\begin{bmatrix}1 \amp 3\\ 2 \amp 6\end{bmatrix}\text{.}\) Find \(\Nul(A)^\perp\text{.}\)

Example 6.14.

Let \(L\) be the line spanned by \(\vec v=\begin{bmatrix}1\\-1\\2\end{bmatrix}\text{.}\) Since \(L\) is 1-dimensional, its orthogonal complement \(L^\perp\) is a plane. Find an equation for the plane \(L^\perp\text{.}\)
Graph of a line L in 3-space passing through the origin and the point (1,-1,2).

Definition 6.15. Row Space.

The row space \(\operatorname{Row}(A)\) is the subspace spanned by the rows of a matrix \(A\text{.}\)
Facts:
  • \(\dim(\operatorname{Row}(A))=\dim(\operatorname{Col}(A))\text{.}\)
  • A basis for \(\operatorname{Row}(A)\) is given by the pivot rows of \(A\text{.}\)
  • In general, \(\operatorname{Row}(A)\) and \(\operatorname{Col}(A)\) are unrelated spaces.

Example 6.16.

Describe \(\Nul(A) \subseteq \mathbb{R}^n\) in terms of an orthogonal subspace.
  1. \(\vec x\in\Nul(A)\) if and only if \(\underline{\hspace{2in}}\text{.}\)
  2. This means \(\vec x\) is \(\underline{\hspace{2in}}\) to each row of \(A\text{.}\)
  3. Therefore \(\operatorname{Row}(A)\) is \(\underline{\hspace{3in}}\) of \(\Nul(A)\text{.}\)
  4. \(\dim(\operatorname{Row}(A))+\dim(\Nul(A))=\underline{\hspace{1in}}\text{.}\)
This geometric structure is often shown using overlapping regions representing the four fundamental subspaces.
Visual representation of the four subspaces from the Four Subspace Theorem
Β 

Example 6.19.

Find the angle between \(\vec v = \begin{bmatrix} 3 \\ 4 \end{bmatrix}\) and \(\vec u = \begin{bmatrix} \dfrac{3 - 4\sqrt{3}}{10} \\ \dfrac{4 + 3\sqrt{3}}{10} \end{bmatrix}\text{.}\) Note that \(\vec u\) is a unit vector.