Thinking about Vectors
Vectors are the fundamental building blocks of linear algebra. They actually have a lot of different interpretations, which can be confusing at first. Here, we will discuss some of the different ways to think about vectors, and how they are all related.
This page will be quite lengthy, but it's important to get a really solid and intuitive understanding of vectors before moving on to more advanced topics.
Table of Contents
What Even is a Vector?
This is surprisingly a difficult question to answer. However, we can start by positing these three interpretations of vectors:
-
To a physicist, a vector is a quantity with both magnitude and direction. It can represent something's position, velocity, or some force acting on it.
This is the most intuitive interpretation of a vector. These vectors are often represented as arrows in space, where the length of the arrow represents the magnitude of the vector, and the direction of the arrow represents the direction of the vector:
-
To a programmer, a vector is just a list of numbers. It could be used to represent a point in space, but it could also represent other things. For example, very commonly, we can represent a color as a vector. All colors can be represented as a combination of red, green, and blue, so a color can be represented as a vector with three components. We hence call this vector three-dimensional.
Vectors can also be used to represent other things that do not have to do with space. You could have a three-dimensional vector representing a person's age, height, and weight for example.
These also apply in scientific studies. For instance, given a chemical reaction, we can represent each reactant and product as a separate component in a vector. In a reaction with 3 reactants and 2 products, we can represent the reaction as a 5-dimensional vector. Another example is in mathematics itself, where we can represent a polynomial as a list of its coefficients.
-
To a mathematician, a vector is a member of a vector space. This is a more abstract definition, but it is the most general. A vector can be anything that has the notion of addition and multiplication defined on it. We will go into detail about this later.
Vectors, as variables, can be notated in a few ways as well:
- As a bold lowercase letter, like
. This is the most common way to notate vectors in digital text. - As a lowercase letter with an arrow on top, like
. This is the most common way to notate vectors in handwritten text, and older digital publications. - Both of the above, like
. This is a compromise between the two, and is most commonly used in educational materials. We will use this notation.
From Arrows to Lists
Let's start by taking the perspective of a physicist.
We have a vector
The point where it starts is called the tail of the vector, and the point where it ends is called the tip of the vector. However, note that the starting point of the vector is arbitrary.
It can be more helpful to think of the vector as an "instruction" to move from the tail to the tip.
If you imagine the
To represent this vector as a list of numbers, we can look at the coordinates of the tip of the vector. In this case, the tip is at
We use square brackets and separate the components vertically to distinguish vectors from regular points in space. Sometimes, especially in physics, vectors are written horizontally with commas separating the components, and angled brackets around them:
As previously stated, this vector can be thought of as an instruction to move 2 units right and 1 unit up. If we do so, we will find ourselves at the tip of the vector:
3D Example
Let's look at a vector in three dimensions. Consider the vector
Vectors and Spaces
Each unique pair of numbers in the coordinate system corresponds to a unique vector.
For example, the vector
These vectors live in a two-dimensional space, hence they have two components, each of which describing how much the vector moves in each direction.
We call this space
In general, a vector with
Any space that vectors can live in is called a vector space. This is a very abstract concept, but we will see that as long as certain rules are followed, anything can be a vector space no matter how crazy they are.
These rules are centered around the operations of addition and scalar multiplication, which we will discuss in a bit.
Magnitude of a Vector
The magnitude of a vector is the length of the arrow representing the vector. It is also known as the norm or the length of the vector.
The magnitude is denoted as
Direction of a Vector
The direction of a vector is the angle it makes with the positive
For a vector
Sumamry and Next Steps
In this page, we introduced the concept of vectors, and discussed how they can be thought of in different ways.
Here are the key points to remember:
-
Vectors can be thought of as arrows in space, lists of numbers, or members of a vector space.
-
They can be thought of as instructions to move from one point to another.
-
The magnitude of a vector is the length of the arrow representing the vector. This can be calculated using the Pythagorean theorem:
-
The direction of a vector is the angle it makes with the positive
-axis: -
Vectors with
components live in an -dimensional space, which we call . Any space that vectors can live in is called a vector space.
Next, we will introduce the two fundamental operations on vectors: addition and scalar multiplication.