%% This document created by Scientific Notebook (R) Version 3.0


\documentclass[12pt,thmsa]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{sw20jart}

%TCIDATA{TCIstyle=article/art4.lat,jart,sw20jart}

%TCIDATA{<META NAME="ViewSettings" CONTENT="23">}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="Title" CONTENT="Reference/Mathematics/Projections Onto Lines">}
%TCIDATA{Created=Mon Aug 19 14:52:24 1996}
%TCIDATA{LastRevised=Fri Mar 28 13:22:21 1997}
%TCIDATA{Language=American English}
%TCIDATA{CSTFile=Reference.cst}
%TCIDATA{PageSetup=72,72,72,72,0}
%TCIDATA{<LINK REL="contents" HREF="..\Reference\ReferenceIndex.tex#Reference Index">}
%TCIDATA{<LINK REL="next" HREF="MA03_03.tex">}
%TCIDATA{<LINK REL="parent" HREF="MA_contents.tex">}
%TCIDATA{<LINK REL="previous" HREF="MA03_01.tex">}
%TCIDATA{AllPages=
%F=36,\PARA{038<p type="texpara" tag="Body Text" >\hfill \thepage}
%}


\input{tcilatex}
\begin{document}


\section{Projections onto Lines\label{Projections Onto Lines}}

\subsubsection{Angle Between Vectors\label{angle between vectors}}

The cosine of the angle between any two vectors $a$ and $b$ is 
\[
\cos \theta =\frac{a^{T}b}{\left| \left| a\right| \right| \left| \left|
b\right| \right| }
\]

\begin{example}
Let $a=\left[ 5,3\right] $ and $b=\left[ 3,-1\right] $. Then the angle
between $a$ and $b$ has cosine 
\[
\cos \theta =\frac{\left[ 5,3\right] ^{T}\left[ 3,-1\right] }{\left\| \left[
2,5\right] \right\| \left\| \left[ 3,-1\right] \right\| }=\frac{1}{\sqrt{29}%
\sqrt{10}}=5.\,\allowbreak 872\,2\times 10^{-2}
\]
You can see the angle is close to a right angle:\FRAME{dtbpFU}{3.3434in}{%
2.2295in}{0pt}{\Qcb{Angle between $\lbrack 5,3\rbrack $ and $\lbrack
3,-1\rbrack $}}{}{}{\special{language "Scientific Word";type
"MAPLEPLOT";width 3.3434in;height 2.2295in;depth 0pt;display "PICT";function
\TEXUX{$\left[ 2,5,0,0,3,-1\right] $};linecolor "red";linestyle
1;linethickness 2;pointstyle "point";xmin "-1";xmax "4";xviewmin
"-1.000000";xviewmax "4.000000";yviewmin "-1.120000";yviewmax
"5.122400";rangeset"X";phi 45;theta 45;plottype 4;plotticks 1;num-x-ticks
4;num-y-ticks 7;constrained TRUE;numpoints 49;axesstyle "normal";xis
\TEXUX{x};var1name \TEXUX{$x$};}}\bigskip The angle $\theta $ between these
vectors is $\theta =\arccos \frac{1}{\sqrt{29}\sqrt{10}}=\allowbreak
1.\,\allowbreak 512\unit{rad}$, or $86.\,\allowbreak 631\unit{\UNICODE{0xb0}}
$.
\end{example}

\subsubsection{Projection\label{projection}}

The projection of the vector $b$ onto the line through the origin and a
vector $a$ is the vector

\[
p=\overline{x}a=\frac{a^{T}b}{a^{T}a}a
\]
where $\overline{x}$ is a scalar multiple of $a$.

\begin{example}
The projection of the vector $b=\left[ 3,4\right] $ onto the vector $%
a=\left[ 5,2\right] $ is the vector 
\[
p=\frac{\left[ 5,2\right] ^{T}\left[ 3,4\right] }{\left[ 5,2\right]
^{T}\left[ 5,2\right] }\left[ 5,2\right] =\frac{23}{29}\left[ 5,2\right]
=\allowbreak \left[ \frac{115}{29},\frac{46}{29}\right] 
\]
depicted in the following plot.\FRAME{dtbpF}{3in}{2.0003in}{0pt}{}{}{}{%
\special{language "Scientific Word";type "MAPLEPLOT";width 3in;height
2.0003in;depth 0pt;display "PICT";function \TEXUX{$\left( 3,4,0,0,5,2\right)
$};linecolor "red";linestyle 1;linethickness 1;pointstyle "point";function
\TEXUX{$\left[ 0,0,\frac{115}{29},\frac{46}{29}\right] $};linecolor
"blue";linestyle 1;linethickness 2;pointstyle "point";function
\TEXUX{$\left[ 3,4,\frac{115}{29},\frac{46}{29}\right] $};linecolor
"black";linestyle 3;linethickness 1;pointstyle "point";function
\TEXUX{$\MATRIX{2,3}{c}\VR{,,c,,,}{,,c,,,}{,,,,,}\HR{,,,}\CELL{3.8}%
\CELL{1.92}\CELL{3.5670}\CELL{1.8111}\CELL{3.6538}\CELL{1.5402}$};linecolor
"black";linestyle 1;linethickness 1;pointstyle "point";xmin "0";xmax
"5";xviewmin "0.000000";xviewmax "5.000000";yviewmin "-0.080000";yviewmax
"4.081600";rangeset"X";phi 45;theta 45;plottype 4;numpoints 49;axesstyle
"normal";xis \TEXUX{x};var1name \TEXUX{$x$};}}
\end{example}

\subsubsection{Schwarz Inequality\label{schwarz inequality}}

Any two vectors $a$ and $b$ satisfy the \textbf{Schwarz inequality}

\[
\left| a^{T}b\right| \leq \left| \left| a\right| \right| \left| \left|
b\right| \right| 
\]

\begin{example}
Let $a=\left[ 3,5,-8\right] $ and $b=\left[ -1,4,7\right] $. Then
\[
\left| a^{T}b\right| =\left| \left[ 3,5,-8\right] ^{T}\left[ -1,4,7\right]
\right| =\left| -39\right| =\allowbreak 39
\]
and 
\[
\left| \left| a\right| \right| \left| \left| b\right| \right| =\left\|
\left[ 3,5,-8\right] \right\| \left\| \left[ -1,4,7\right] \right\| =\left( 7%
\sqrt{2}\right) \left( \sqrt{66}\right) =14\sqrt{33}=80.\,\allowbreak 424
\]
\end{example}

\subsection{\ Related Scientific Notebook Topics}

{\small \hyperref{Computing inner product with matrix multiplication}{}{}{%
../../Help/DM8-2.tex#Matrix product}}

{\small \hyperref{Computing vector inner product}{}{}{%
../../Help/DM9-1.tex#Dot product}}

{\small \hyperref{Norm}{}{}{../../Help/DM8-5.tex#Norm}} 

\noindent \hrulefill

\begin{center}
\begin{tabular}{ccc}
{\small \hyperref{\FRAME{itbpF}{13.9375pt}{14.4375pt}{3pt}{}{}{nblogo.wmf}{%
\special{language "Scientific Word";type "GRAPHIC";maintain-aspect-ratio
TRUE;display "PICT";valid_file "F";width 13.9375pt;height 14.4375pt;depth
3pt;original-width 24.0625pt;original-height 24.8125pt;cropleft "0";croptop
"0.9959";cropright "0.9937";cropbottom "0";filename
'Nblogo.wmf';file-properties "XNPEU";}}Computing Techniques}{}{}{%
../../Help/DMindex.tex}} & {\small \hyperref{\FRAME{itbpF}{13.9375pt}{%
14.4375pt}{3pt}{}{}{nblogo.wmf}{\special{language "Scientific Word";type
"GRAPHIC";maintain-aspect-ratio TRUE;display "PICT";valid_file "F";width
13.9375pt;height 14.4375pt;depth 3pt;original-width
24.0625pt;original-height 24.8125pt;cropleft "0";croptop "0.9959";cropright
"0.9937";cropbottom "0";filename 'Nblogo.wmf';file-properties "XNPEU";}}%
General Information}{}{}{../../Help/Index.tex}} & {\small \hyperref{\FRAME{%
itbpF}{13.9375pt}{14.4375pt}{3pt}{}{}{nblogo.wmf}{\special{language
"Scientific Word";type "GRAPHIC";maintain-aspect-ratio TRUE;display
"PICT";valid_file "F";width 13.9375pt;height 14.4375pt;depth
3pt;original-width 24.0625pt;original-height 24.8125pt;cropleft "0";croptop
"0.9959";cropright "0.9937";cropbottom "0";filename
'Nblogo.wmf';file-properties "XNPEU";}}Reference Library}{}{}{%
../ReferenceIndex.tex}}
\end{tabular}
\end{center}

\noindent \hrulefill

\end{document}
