JMU
Vector Mathematics in 2D
An Introduction to 2D Vectors


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu


Some Notation
Members of \(\mathbb{R}^{2}\)
Two Things to be Aware Of
Visualization of Points

Points

images/point2d.gif
Multiplication by a Scalar
Addition
Subtraction
Subtraction (cont.)
Visualization of Points and Directions Revisited
images/vector2d.gif

We will use the different visualization techniques in different situations. So, you will have to be very careful.

Visualization of Addition Revisited
An Example of the Visualization of Points and Directions
The Standard Basis
The Standard Basis (cont.)

Visualization

images/standardbasis2d.gif
The Standard Basis (cont.)
The Standard Basis and the Unit Circle
images/standard-basis_unit-circle.png

Since the distance from the origin to \(\bs{p}\) is 1, it follows that: \[ \cos(\theta) = \frac{p_1}{1} \\ \sin(\theta) = \frac{p_2}{1} \]

Which is to say that \( \bs{p} := (p_1, p_2) = (\cos(\theta), \sin(\theta)) \)

Hence, any point, \(\bs{q}\), on the unit sphere can be represented as: \[ \bs{q} = (1, 0) \cdot \cos(\theta) + (0, 1) \cdot \sin(\theta) = \bs{i} \cos(\theta) + \bs{j} \sin(\theta) \]

The Inner (Dot) Product
The Euclidean Norm (Length) of a Vector
The Euclidean Norm (Length) of a Vector (cont.)
Unit Vector
Normalization
Generalizing the Pythagorean Theorem
The Angle Formed by Vectors
The Angle Formed by Vectors (cont.)
Weighted Combinations
Weighted Combinations (cont.)

Weighted Combinations of \(\bs{q}\) and \(\bs{r}\)

images/weightedcombinations2d.gif
Weighted Combinations (cont.)

Convex Combinations of \(q\) and \(r\)

images/convexcombinations2d.gif
Weighted Combinations (cont.)

Barycentric Combinations of \(q\) and \(r\)

images/barycentriccombinations2d.gif
Weighted Combinations (cont.)