If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Multivariable calculus

### Course: Multivariable calculus>Unit 1

Lesson 2: Vectors and matrices

# Vectors and notation

Learn about what vectors are, how we can visualize them, and how we can combine them.
Vectors are the building blocks of everything multivariable. We use them when we want to represent a coordinate in higher-dimensional space or, more generally, to write a list of anything. In this article, we'll cover what vectors are, different ways to write them, and the three basic vector operations.

## What is a vector?

Most generally, a vector is a list of things. In multivariable calculus, "thing" typically ends up meaning "number," but not always. For example, we'll see a vector made up of derivative operators when we talk about multivariable derivatives. This generality is super useful down the line.

### Vectors and points in space

When a vector is just a list of numbers, we can visualize it as an arrow in space. For example, we visualize the vector left parenthesis, 4, comma, 2, right parenthesis as an arrow whose tail is at the origin and whose tip is at the point left parenthesis, 4, comma, 2, right parenthesis. For this reason, we don't usually distinguish between points and vectors in multivariable calculus.
However, sometimes we draw a vector with the tail away from the origin. This changes nothing about the vector, only where we draw it. For example, we can also draw the vector left parenthesis, 4, comma, 2, right parenthesis starting at left parenthesis, 0, comma, 2, right parenthesis. Both arrows correspond to the vector left parenthesis, 4, comma, 2, right parenthesis, even though one of them doesn't end at the point left parenthesis, 4, comma, 2, right parenthesis.
This is why it can sometimes be confusing to write vectors exactly like points in space. For this reason, people have come up with other notations for vectors.

## Notation

There are lots of ways to write vectors. Here are the three we'll use most in this course. The little arrow on top of v, with, vector, on top is a convention that indicates that v, with, vector, on top refers to a vector.
\begin{aligned} \vec{v} &= (1, 2, 3) = \left[ \begin{array}{c} 1 \\ 2 \\ 3 \end{array} \right] = 1 \blueD{\hat{\imath}} + 2 \maroonD{\hat{\jmath}} + 3 \greenD{\hat{k}} \end{aligned}
The first notation is what we discussed earlier. Technically it refers to a point, but we use it interchangeably to refer to a vector. This notation extends to any number of dimensions.
The second notation is matrix notation, which we can also extend to as many dimensions as we want. Matrix notation is particularly useful when we think about vectors interacting with matrices. We'll discuss matrices and how to visualize them in coming articles.
The third notation, unlike the previous ones, only works in 2D and 3D. The symbol start color #11accd, \imath, with, hat, on top, end color #11accd (pronounced "i hat") is the unit x vector, so start color #11accd, \imath, with, hat, on top, end color #11accd, equals, left parenthesis, 1, comma, 0, comma, 0, right parenthesis. Similarly, start color #ca337c, \jmath, with, hat, on top, end color #ca337c, equals, left parenthesis, 0, comma, 1, comma, 0, right parenthesis and start color #1fab54, k, with, hat, on top, end color #1fab54, equals, left parenthesis, 0, comma, 0, comma, 1, right parenthesis. This notation might make more sense once we cover vector addition.
In this course, we almost always use the left parenthesis, 1, comma, 2, comma, 3, right parenthesis notation in exercises, because it saves space when we need to define multiple variables. The videos use a mix of matrix notation and the 1, start color #11accd, \imath, with, hat, on top, end color #11accd, plus, 2, start color #ca337c, \jmath, with, hat, on top, end color #ca337c, plus, 3, start color #1fab54, k, with, hat, on top, end color #1fab54 notation.

One of the basic vector operations is addition. In general, whenever we add two vectors, we add their corresponding components:
left parenthesis, a, comma, b, comma, c, right parenthesis, plus, left parenthesis, A, comma, B, comma, C, right parenthesis, equals, left parenthesis, a, plus, A, comma, b, plus, B, comma, c, plus, C, right parenthesis
This works in any number of dimensions, not just three. We can visualize the sum start color #11accd, a, with, vector, on top, end color #11accd, plus, start color #ca337c, b, with, vector, on top, end color #ca337c as sliding the tail of start color #ca337c, b, with, vector, on top, end color #ca337c to the tip of start color #11accd, a, with, vector, on top, end color #11accd. Here's an example of that in 2D.
Let's try a practice question.
Problem 1
left parenthesis, minus, 3, comma, 2, right parenthesis, plus, left parenthesis, 1, comma, 4, right parenthesis, equals
left parenthesis
comma
right parenthesis

If you want to go deeper, learn about how to understand vector addition visually with this video, and get practice with this exercise.

## Scalar multiplication

The second basic vector operation is scalar multiplication, which is when we stretch or shrink a vector. Scalar is just a fancy word for number (same root as the word scaling). Here's an example of how it works:
\begin{aligned} \vec{b} &= (1, 2, 3) \\ \\ 2\vec{b} &= (2, 4, 6) \\ \\ 0.5\vec{b} &= (0.5, 1, 1.5) \\ \\ -\vec{b} &= (-1, -2, -3) \end{aligned}
In general, scaling a vector by a number means multiplying each of the vector's components by that number. That means
\begin{aligned} x \vec{a} = x (a, b, c) = (xa, xb, xc) \end{aligned}
Let's try an example.
Problem 2
If a, with, vector, on top, equals, left parenthesis, 2, comma, minus, 1, right parenthesis,
then 3, a, with, vector, on top, equals, left parenthesis
comma
right parenthesis.

The intuitive meaning of scaling a vector by a factor of 2 is that we are making the vector twice as long. Here's what that looks like:
Scaling by a factor of 0, point, 5 makes a vector half as long. This would look like the above vector left parenthesis, 2, comma, 4, right parenthesis becoming left parenthesis, 1, comma, 2, right parenthesis, instead of the other way around.
Scaling by a factor of minus, 1 means flipping the direction of a vector, because each of its components becomes the opposite of what it used to be. Here's an example of what that looks like:
If you want to go deeper, check out this video, and get practice with this exercise.

## Magnitude

When we visualize vectors as arrows, a natural question to ask might be, "How long is it?" The magnitude of a vector answers this question. We write the magnitude of a vector with double bars on both sides, or sometimes with just single bars: \|, a, with, vector, on top, \| or vertical bar, a, with, vector, on top, vertical bar.
We calculate the magnitude with the Pythagorean theorem, because we can think of a vector as the hypotenuse of a triangle. This is equivalent to using the distance formula, so the magnitude of the vector left parenthesis, a, comma, b, right parenthesis is square root of, a, squared, plus, b, squared, end square root.
Let's try an example.
Problem 3
If a, with, vector, on top, equals, left parenthesis, 2, comma, 5, right parenthesis, then \|, a, with, vector, on top, \|, equals

Magnitude works the same in 3D and in higher dimensions.
Problem 4
If b, with, vector, on top, equals, left parenthesis, minus, 2, comma, 3, comma, 1, right parenthesis, then \|, b, with, vector, on top, \|, equals

If you want to go deeper, check out this video, and get practice with this exercise

## What's next

Beyond addition, scalar multiplication, and magnitude, there are two more important operations between vectors. These are the dot product and the cross product, and we will cover them in the next two articles.

## Want to join the conversation?

• Why can't we use the i-hat notation for vectors in higher dimensions? Is it because we can't imagine vectors in >3 dimensions using orthogonal unit vectors? If this is the case then how can the notion of using Pythagorean theorem to calculate the magnitude of a vector be extended to higher dimensions (>3)?