No history yet

Vectors and Vector Operations

Magnitude and Direction

Some quantities in the world can be described with just a single number. Your age, the temperature outside, or the price of a coffee are all examples of scalars. They only have magnitude, or size.

But what about describing how to get from your house to the library? You need more than just a distance. You also need a direction. A quantity that has both magnitude and direction is called a vector.

Think of a vector as an arrow. The length of the arrow is its magnitude, and the way it points is its direction.

We often represent vectors in a coordinate system. A 2D vector, for example, can be written as a pair of numbers, like v=(3,4)v = (3, 4). This means the vector's arrow starts at the origin (0,0)(0,0) and ends at the point (3,4)(3,4). The first number tells you how far to move along the x-axis, and the second tells you how far to move along the y-axis.

This vector has a specific length (magnitude) and points in a specific direction. We can find the magnitude using the Pythagorean theorem. For our vector v=(3,4)v=(3,4), the magnitude, often written as v||v||, is 32+42=9+16=25=5\sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5.

Combining Vectors

What happens when we want to combine vectors? We can add or subtract them. Let's start with addition. Imagine taking a walk. You first walk 4 blocks east, and then 3 blocks north. Each part of your walk is a vector. Your final position relative to your starting point is the sum of those two vectors.

To add vectors, we simply add their corresponding components. If we have two vectors, u=(u1,u2)u = (u_1, u_2) and v=(v1,v2)v = (v_1, v_2), their sum is:

u+v=(u1+v1,u2+v2)u + v = (u_1 + v_1, u_2 + v_2)

Let's say vector u=(1,3)u = (1, 3) and vector v=(4,1)v = (4, 1). Their sum is: u+v=(1+4,3+1)=(5,4)u + v = (1+4, 3+1) = (5, 4).

Geometrically, this looks like placing the tail of the second vector at the head of the first. The new vector, called the resultant, goes from the tail of the first vector to the head of the second.

Lesson image

Vector subtraction works similarly. To subtract a vector, you add its opposite. The opposite of a vector has the same magnitude but points in the exact opposite direction. To find the opposite, you just negate each component.

If v=(v1,v2)v = (v_1, v_2), then v=(v1,v2)-v = (-v_1, -v_2).

So, to calculate uvu - v, we compute u+(v)u + (-v).

uv=(u1v1,u2v2)u - v = (u_1 - v_1, u_2 - v_2)

Using our same vectors, u=(1,3)u = (1, 3) and v=(4,1)v = (4, 1), the difference is: uv=(14,31)=(3,2)u - v = (1-4, 3-1) = (-3, 2).

Geometrically, uvu-v is the vector that goes from the tip of vv to the tip of uu.

Scaling Vectors

Besides combining vectors with each other, we can also change their magnitude by multiplying them by a scalar. This is called scalar multiplication. It stretches, shrinks, or flips the vector's direction without changing the line it lies on.

A vector can be multiplied by a scalar to stretch or shrink its magnitude without changing its direction.

To perform scalar multiplication, you multiply each component of the vector by the scalar. If cc is a scalar and v=(v1,v2)v = (v_1, v_2) is a vector, then:

cv=(cv1,cv2)c \cdot v = (c \cdot v_1, c \cdot v_2)

Let's take our vector v=(3,4)v = (3, 4) again. If we multiply it by the scalar 2, we get a new vector that points in the same direction but is twice as long.

2v=(23,24)=(6,8)2v = (2 \cdot 3, 2 \cdot 4) = (6, 8)

If we multiply it by -1, we get a vector of the same length pointing in the opposite direction.

1v=(13,14)=(3,4)-1v = (-1 \cdot 3, -1 \cdot 4) = (-3, -4)

And if we multiply it by 0.5, we get a vector that's half as long.

0.5v=(0.53,0.54)=(1.5,2)0.5v = (0.5 \cdot 3, 0.5 \cdot 4) = (1.5, 2)

Lesson image

These three operations—addition, subtraction, and scalar multiplication—are the basic building blocks for everything we do with vectors. Mastering them is the first step into the broader world of linear algebra.

Ready to check your understanding? Let's try a few questions.

Quiz Questions 1/5

Which of the following best describes the fundamental difference between a scalar and a vector?

Quiz Questions 2/5

Given two vectors, u=(1,5)u = (1, 5) and v=(3,2)v = (3, -2), what is their sum u+vu + v?