What is a Vector?
A vector is a mathematical object that has both magnitude (size) and direction. Unlike regular numbers (scalars) that only have magnitude, vectors tell us "how much" and "which way."
Representing Vectors
Arrow Notation
Visually, we represent vectors as arrows. The arrow's length represents the magnitude, and the arrow points in the direction of the vector.
Interactive: Drag the vector endpoint
Component Form
In coordinate systems, we write vectors as ordered lists of numbers called components. In 2D:
For example, the vector \(\vec{v} = (3, 4)\) means:
- Move 3 units in the x-direction (right)
- Move 4 units in the y-direction (up)
3D and Higher Dimensions
Vectors can exist in any number of dimensions:
- 2D: \(\vec{v} = (x, y)\) - position on a plane
- 3D: \(\vec{v} = (x, y, z)\) - position in space
- nD: \(\vec{v} = (v_1, v_2, ..., v_n)\) - used in AI/ML for embeddings
Vector Notation
Different notations are used depending on context:
| Notation | Example | Common In |
|---|---|---|
| Arrow | \(\vec{v}\) | Physics, Mathematics |
| Bold | v | Textbooks, printed material |
| Component | (3, 4) or [3, 4] | Programming, Linear algebra |
| Unit vectors | \(3\hat{i} + 4\hat{j}\) | Physics, Engineering |
Vector Magnitude
The magnitude (or length) of a vector is calculated using the Pythagorean theorem:
For the vector (3, 4):
Key Properties
Vectors vs Points
While both can be written as (x, y), they represent different things:
- Point: A specific location in space
- Vector: A displacement (direction and magnitude) that can start anywhere
Zero Vector
The zero vector \(\vec{0} = (0, 0)\) has no magnitude and no defined direction. It's the additive identity for vectors.
Applications
Vectors are foundational to many fields:
Physics
Force, velocity, acceleration, momentum
Graphics
Positions, transformations, lighting, normals
AI/ML
Word embeddings, image features, similarity
Next Steps
Now that you understand the basics, continue with:
- Vector Addition - Learn to add and subtract vectors
- Vector Magnitude - Deep dive into calculating length
- Dot Product - The most important vector operation