Vectors and Dot Products
Vectors and Dot Products
Vectors are the geometric counterpart to matrices. While a matrix stores an entire transformation or data table, a vector represents a single quantity that has both magnitude (how large) and direction (which way). Forces, velocities, displacements, and electric fields are all naturally described by vectors, and the ability to add them, scale them, and measure angles between them is fundamental to physics, engineering, computer graphics, and machine learning.
In coordinates, a 2-D vector $\langle a,b \rangle$ is just an ordered pair, and a 3-D vector $\langle a,b,c \rangle$ is an ordered triple. You add vectors component-by-component and multiply by a scalar component-by-component — operations that are almost trivially simple yet immensely powerful. The magnitude of a vector is its length, computed by the Pythagorean theorem: $\|\mathbf{v}\| = \sqrt{a^2 + b^2}$.
The dot product (or scalar product) takes two vectors and returns a single number: $\mathbf{u} \cdot \mathbf{v} = u_1 v_1 + u_2 v_2$. This number carries geometric meaning — it is related to the cosine of the angle between the two vectors. When the dot product is zero, the vectors are perpendicular (orthogonal), a property that appears constantly in projections, least-squares fitting, and Fourier analysis.
In this lesson you will practice vector addition, scalar multiplication, magnitude calculation, and dot-product computation. The interactive tool lets you adjust two vectors and immediately see their sum, individual magnitudes, dot product, and the angle between them, all rendered on a canvas so you can build geometric intuition alongside algebraic skill.
Add vectors component-wise and multiply by scalars component-wise.
Add $\langle 2,-1 \rangle + \langle 4,3 \rangle$.
- $\langle 6,2 \rangle$.
$$\|\mathbf{v}\|=\sqrt{a^2+b^2}$$ in 2D.
Find the magnitude of $\langle 3,4 \rangle$.
- $5$.
$$\mathbf{u}\cdot\mathbf{v}=u_1v_1+u_2v_2$$
If the dot product is $0$, the vectors are perpendicular.
Compute $\langle 1,2 \rangle\cdot\langle 3,4 \rangle$.
- $1(3)+2(4)=11$.
Practice Problems
Show Answer Key
1. $\langle -1,9 \rangle$
2. $10$
3. $7$
4. The vectors are perpendicular
5. $\langle 6,-2 \rangle$