2024-02-10 20:57:14 -08:00

110 lines
3.4 KiB
TeX

\section*{Prerequisite: Vector Basics}
\definition{Vectors}
An $n$-dimensional \textit{vector} is an element of $\mathbb{R}^n$. In this handout, we'll write vectors as columns. \par
For example, $\left[\begin{smallmatrix} 1 \\ 3 \\ 2 \end{smallmatrix}\right]$ is a vector in $\mathbb{R}^3$.
\definition{Euclidean norm}
The length of an $n$-dimensional vector $v$ is computed as follows:
\begin{equation*}
|v| = \sqrt{v_0^2 +v_1^2 + ... + v_n^2}
\end{equation*}
Where $v_0$ through $v_n$ represent individual components of this vector. For example,
\begin{equation*}
\left|\left[\begin{smallmatrix} 1 \\ 3 \\ 2 \end{smallmatrix}\right]\right| = \sqrt{1^2 + 3^2 + 2^2} = \sqrt{14}
\end{equation*}
\definition{Transpose}
The \textit{transpose} of a vector $v$ is $v^\text{T}$, given as follows:
\begin{equation*}
\left[\begin{smallmatrix} 1 \\ 3 \\ 2 \end{smallmatrix}\right]^\text{T}
=
\left[\begin{smallmatrix} 1 & 3 & 2 \end{smallmatrix}\right]
\end{equation*}
That is, we rewrite the vector with its rows as columns and its columns as rows. \par
We can transpose matrices too, of course, but we'll get to that later.
\problem{}
What is the length of $\left[\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right]^\text{T}$? \par
\vfill
\definition{}
We say a vector $v$ is a \textit{unit vector} or a \textit{normalized} vector if $|v| = 1$.
\pagebreak
\definition{Vector products}
The \textit{dot product} of two $n$-dimensional vectors $v$ and $u$ is computed as follows:
\begin{equation*}
v \cdot u = v_0u_0 + v_1u_1 + ... + v_nu_n
\end{equation*}
\vfill
\definition{Vector angles}<vectorangle>
For any two vectors $a$ and $b$, the following holds:
\null\hfill
\begin{minipage}{0.48\textwidth}
\begin{equation*}
\cos{(\phi)} = \frac{a \cdot b}{|a| \times |b|}
\end{equation*}
\end{minipage}
\hfill
\begin{minipage}{0.48\textwidth}
\begin{center}
\begin{tikzpicture}[scale=1.5]
\draw[->] (0, 0) -- (0.707, 0.707);
\draw[->, gray] (0.5, 0.0) arc (0:45:0.5);
\node[gray] at (0.6, 0.22) {$\phi$};
\draw[->] (0, 0) -- (1.2, 0);
\node[right] at (1.2, 0) {$a$};
\node[right] at (0.707, 0.707) {$b$};
\end{tikzpicture}
\end{center}
\end{minipage}
\hfill\null
This can easily be shown using the law of cosines. \par
For the sake of time, we'll skip the proof---it isn't directly relevant to this handout.
\definition{Orthogonal vectors}
We say two vectors are \textit{perpendicular} or \textit{orthogonal} if the angle between them is $90^\circ$. \par
Note that this definition works with vectors of any dimension.
\note{
In fact, we don't need to think about other dimensions: two vectors in an $n$-dimensional space nearly always
define a unique two-dimensional plane (with two exceptions: $\phi = 0^\circ$ and $\phi = 180^\circ$).
}
\problem{}
What is the dot product of two orthogonal vectors?
\vfill
\pagebreak
%For example, the set $\{[1,0,0], [0,1,0], [0,0,1]\}$ (which we usually call $\{x, y, z\})$
%forms an orthonormal basis of $\mathbb{R}^3$. Every element of $\mathbb{R}^3$ can be written as a linear combination of these vectors:
%
%\begin{equation*}
% \left[\begin{smallmatrix} a \\ b \\ c \end{smallmatrix}\right]
% =
% a \left[\begin{smallmatrix} 1 \\ 0 \\ 0 \end{smallmatrix}\right] +
% b \left[\begin{smallmatrix} 0 \\ 1 \\ 0 \end{smallmatrix}\right] +
% c \left[\begin{smallmatrix} 0 \\ 0 \\ 1 \end{smallmatrix}\right]
%\end{equation*}
%
%The tuple $[a,b,c]$ is called the \textit{coordinate} of a point with respect to this basis.
\vfill
\pagebreak