Inner Product

Projection Map
In [math]\mathbb{R}^2[/math], we consider a unit vector [math]u[/math]. We define the [b]projection map[/b] onto the line containing vector [math]u[/math] as follows: For any vector [math]v[/math] in [math]\mathbb{R}^2[/math], [math]P_u:\mathbb{R}^2\to \mathbb{R}[/math] such that [math]P_u(v)[/math] is the [u]signed distance[/u] from the origin to the foot of the perpendicular to the line containing [math]u[/math] from the arrowhead of [math]v[/math]. The sign is positive/negative if the vector from the origin to the foot of the perpendicular is in the same/opposite direction of [math]u[/math], as shown in the applet below.[br][br]As illustrated by the applet below, [math]P_u:\mathbb{R}^2\to \mathbb{R}[/math] is in fact a linear transformation. Therefore, it can be represented by an 1 x 2 matrix. Moreover, it can be shown that [math]P_u(\hat{\mathbf{i}})=u_x[/math] and [math]P_u(\hat{\mathbf{j}})=u_y[/math], where [math]u=\begin{pmatrix}u_x\\u_y\end{pmatrix}[/math]. Hence, for any [math]v=\begin{pmatrix}v_x\\v_y\end{pmatrix}[/math], we have[br][br][math]P_u(v)=\left(u_x \ u_y\right)\begin{pmatrix}v_x\\v_y\end{pmatrix}=u_xv_x+u_yv_y[/math]
Inner Product
The definition of projection map can readily be generalized to [math]\mathbb{R}^3[/math] or even [math]\mathbb{R}^n[/math] i.e. suppose [math]u=\begin{pmatrix}u_1\\u_2\\ \vdots \\ u_n\end{pmatrix}[/math] is a unit vector in [math]\mathbb{R}^n[/math]. Then for any vector [math]v=\begin{pmatrix}v_1\\v_2\\ \vdots \\ v_n\end{pmatrix}[/math] in [math]\mathbb{R}^n[/math], we define the projection map onto the line containing [math]u[/math] as follows:[br][br][math]P_u(v)=u^Tv=\left(u_1 \ u_2 \ \cdots \ u_n\right)\begin{pmatrix}v_1\\v_2\\ \vdots \\ v_n\end{pmatrix}=u_1v_1+u_2v_2+\cdots+u_nv_n[/math][br][br]Since the above definition is symmetric in [math]u[/math] and [math]v[/math], this suggests that we should extend the definition to any vector [math]u[/math], without the restriction that [math]u[/math] is a unit vector:[br][br][u]Definition[/u]: Given any vectors [math]u,v[/math] in [math]\mathbb{R}^n[/math], the real number [math]u^Tv=\left(u_1 \ u_2 \ \cdots \ u_n\right)\begin{pmatrix}v_1\\v_2\\ \vdots \\ v_n\end{pmatrix}=u_1v_1+u_2v_2+\cdots+u_nv_n[/math] is called the [b]inner product[/b] (or [b]dot product[/b]) of [math]u[/math] and [math]v[/math], usually denoted by [math]u\cdot v[/math].[br][br][u]Remarks[/u]:[br][list][*]If [math]u\ne0[/math], then we can write [math]u=s\hat{u}[/math], where [math]\hat{u}[/math] is the unit vector in the direction of [math]u[/math] and [math]s[/math] is the length of the vector [math]u[/math]. Hence [math]u\cdot v=(s\hat{u})^Tv=s(\hat{u}^Tv)=sP_{\hat{u}}v[/math]. Moreover, for any nonzero vector [math]v[/math], [math]v[/math] is perpendicular to [math]u[/math] if and only if [math]P_{\hat{u}}v=0[/math], or equivalently, [math]u\cdot v=0[/math]. [br][/*][*]The geometric concept of the "angle between two vectors" is encoded in the inner product: Let [math]\hat{u}[/math] and [math]\hat{v}[/math] be two unit vectors in [math]\mathbb{R}^2[/math] or [math]\mathbb{R}^3[/math], then [math]\hat{u}\cdot \hat{v}=P_{\hat{u}}\hat{v}=\cos(\theta)[/math], where [math]\theta[/math] is the angle between the two vectors. Therefore, in [math]\mathbb{R}^n[/math], we can define the "angle between two vectors" through inner product.[br][/*][/list][br]The following are some basic properties of the inner product: Let [math]u,v[/math] and [math]w[/math] be vectors in [math]\mathbb{R}^n[/math], and let [math]c[/math] be any real number. Then[br][list=1][*][math]u\cdot v=v\cdot u[/math][br][/*][*][math](u+v)\cdot w=u\cdot w+v\cdot w[/math][br][/*][*][math](cu)\cdot v=c(u\cdot v)=u\cdot(cv)[/math][br][/*][*][math]u\cdot u\geq 0[/math] and [math]u\cdot u=0[/math] if and only if [math]u=0[/math][/*][/list][br]Notice that for any vector [math]u[/math] in [math]\mathbb{R}^2[/math] (or [math]\mathbb{R}^3[/math]), [math]u\cdot u=u_x^2+u_y^2[/math] (or [math]u\cdot u=u_x^2+u_y^2+u_z^2[/math]), which is the square of the length of the vector. Hence, we can generalize this definition to vectors in [math]\mathbb{R}^n[/math] as follows:[br][br][u]Definition[/u]: The [b]length[/b] (or [b]norm[/b]) of vector [math]v[/math] in [math]\mathbb{R}^n[/math] is the nonnegative real number [math]\|v\|[/math] defined by[br][br][math]\|v\|=\sqrt{v\cdot v}=\sqrt{v_1^2+v_2^2+\cdots+v_n^2}[/math][br][br]Given any nonzero vector [math]v[/math], we can compute the unit vector [math]\hat{v}[/math] in the direction of [math]v[/math] as follows:[br][br][math]\hat{v}=\frac1{\|v\|}v[/math][br][br][br]For any two vectors [math]u,v[/math] in [math]\mathbb{R}^n[/math]. We can measure the [b]distance[/b] between the arrowheads of the two vectors by finding the length of the vector from one arrowhead to another i.e. the distance is [math]\|u-v\|[/math].[br][br][br]
Exercise
Let [math]u=\begin{pmatrix}2\\3\\-1\end{pmatrix}[/math] in [math]\mathbb{R}^3[/math]. [br][list=1][*]Find the unit vector [math]\hat{u}[/math].[/*][br][*]Let [math]L[/math] be the line through the origin containing [math]u[/math]. Using the inner product, find the perpendicular distance from the point [math](-2,0,7)[/math] to the line [math]L[/math].[br][/*][/list][br]
Suppose [math]u,v[/math] are two vectors in [math]\mathbb{R}^n[/math].[br][list=1][*]Prove that [math]\|u-v\|^2=\|u\|^2+\|v\|^2-2u\cdot v[/math]. (Hint: write the norms in terms of inner products)[/*][br][*]Using (1), prove that [math]u\cdot v=\frac14\left(\|u+v\|^2-\|u-v\|^2\right)[/math]. (Note: This is called the [b]polarization identity[/b]. Using it, we can define the inner product in terms of the norm)[/*][br][*]Using (1), prove the law of cosine for triangles on a plane.[/*] [br][/list]
Close

Information: Inner Product