\documentclass[a4paper,11pt]{article}

% Definitions for the document
\def \Course {Interactive Computer Graphics }
\def \LectureNo {0}
% font definitions used in vector algebra
\newcommand{\Vector}[1]{\mathbf{#1}}
\newcommand{\UVector}[1]{\textbf{\em #1}}
\newcommand{\Matrix}[1]{\mathcal{#1}}
% standard layout for Duncan's lecture notes and tutorial material
\usepackage[margin=2cm, nohead]{geometry}
\usepackage{times}
\usepackage{wrapfig}
\usepackage{subfigure}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{amsfonts}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\headrulewidth}{0pt}
\lfoot{\footnotesize{\Course :Vector Algebra Revision Notes }}
\rfoot{\footnotesize{\thepage}}
% end of standard layout

\begin{document}

\section*{Vector Algebra Revision Notes}

A vector is a one dimensional array of numbers: [1,55,79.3, -25] is a vector. For analysis of three dimensional geometry we will consider only vectors of dimension two or three.

A vector $\Vector{p} = [p_x,p_y,p_z]$ has magnitude computed by $|\Vector{p}| = \sqrt(p_x^2 + p_y^2 + p_z^2)$ and a direction which is defined  by angles with the Cartesian axes: $\theta_x, \theta_y, \theta_z$ where $\cos\theta_x = p_x/|\Vector{p}|, \cos\theta_y = p_y/|\Vector{p}|$ and $\cos\theta_z = p_z/|\Vector{p}|$. A vector does not have any particular position on the Cartesian axes.

A unit vector is one where $|\Vector{p}|=1$. By convention, the unit vectors in the directions of the Cartesian axes are labelled $\UVector{i} = [1,0,0]$, $\UVector{j}=[0,1,0]$ and $\UVector{k} = [0,0,1]$. Unit vectors are often used for specifying directions. Lower case bold italic letters are used for unit vectors in these notes.

A position vector is simply a coordinate in Cartesian space. It is a particular instance of a vector which starts from the origin. Upper case bold letters are used for position vectors in these notes. 

A direction vector is the same as a vector. The name is used particularly when a vector defines a direction and its magnitude is not relevant. Lower case bold letters are used for direction vectors in these notes.

\textbf{Vector Addition:} There is only one way to add vectors, and that is to add the individual ordinates, so: $\Vector{p} + \Vector{q} = [p_x, p_y, p_z] + [q_x,q_y,q_z] = [p_x+q_x, p_y+q_y, p_z+q_z]$.

\textbf{Scalar multiplication:} Multiplication of a vector by a scalar means that each element of the vector is multiplied by the scalar, ie $\mu\Vector{d} =\mu[d_x,d_y,d_z] = [\mu d_x, \mu d_y, \mu d_z]$. Multiplication by $-1$ reverses the direction of a vector. Scalar multiplication and vector addition can be combined to define a line in Cartesian space. The equation: $\Vector{P} = \Vector{B} + \mu\Vector{d}$ specifies a line through point (position vector) $\Vector{B}$ in direction $\Vector{d}$. Choosing any value of $\mu$ will identify one point on the line.

\textbf{The scalar (or dot) product:} There are two ways of multiplying two vectors together. The scalar product returns a scalar value defined as $\Vector{p} \cdot \Vector{q} = p_xq_x + p_yq_y + p_zq_z$. Note that we can write the magnitude of a vector as $|\Vector{p}| = \sqrt(\Vector{p} \cdot \Vector{p})$. The dot product can be written equivalently as $\Vector{p} \cdot \Vector{q} = |\Vector{p}||\Vector{q}| \cos(\theta)$ where $\theta$ is the angle between the directions of $\Vector{p}$ and $\Vector{q}$. The dot product has some useful properties:
\begin{enumerate}
\item If two vectors are at right angles, the dot product is zero.
\item If the angle between two vectors is acute the dot product is positive.
\item If one of the vectors is a unit vector the dot product is a projection of the other vector in that
direction.
\end{enumerate}

\textbf{The vector (or cross) product:} The second way of multiplying two vectors results in a vector defined by: $\Vector{p} \times \Vector{q} = [(p_yq_z-p_zq_y), (p_zq_x - p_xq_z), (p_xq_y - p_yq_x)]$. This formula may be easily remembered by considering the evaluation of the determinant:
\begin{equation}
\nonumber
\Vector{p} \times \Vector{q}  = 
  \begin{array}{ | c c c | }
     \UVector{i} & \UVector{j} & \UVector{k}  \\
     p_x & p_y & p_z \\
     q_x & q_y & q_z  \\
  \end{array}
\end{equation}
The vector product is a vector whose magnitude is given by $\Vector{p} \times \Vector{q} = |\Vector{p}||\Vector{q}| \sin(\theta)$ and whose direction is at right angles to both $\Vector{p}$ and $\Vector{q}$. Note that $\Vector{p} \times \Vector{p} = [0,0,0]$ and has no direction. The same is true for any two vectors with the same direction. To be precise about the direction we need to know its sign. The rule for determining this is best remembered by thinking of the two vectors as the hands of a clock. Measuring the angle clockwise from $\Vector{p}$ to $\Vector{q}$ the direction is \textit{into} the clock for positive $|\Vector{p}||\Vector{q}| \sin(\theta)$. Note that $\Vector{p} \times \Vector{q} = -\Vector{q} \times \Vector{p}$ since, if the angle between $\Vector{p}$ and $\Vector{q}$ is $\theta$, then the angle between $\Vector{q}$ and $\Vector{p}$ will be $\sin(360-\theta)$, and $\sin(360-\theta) = \sin(-\theta) = - \sin(\theta)$. The useful property of the cross product is that it defines a direction at right angles to two vectors. Thus we can use it to find the normal vector to a plane simply by taking the cross product of two vectors on the plane. For most graphics applications we need to test which direction the normal vector goes.

\end{document}