Main content

## Linear algebra

### Unit 1: Lesson 1

Vectors- Vector intro for linear algebra
- Real coordinate spaces
- Adding vectors algebraically & graphically
- Multiplying a vector by a scalar
- Vector examples
- Scalar multiplication
- Unit vectors intro
- Unit vectors
- Add vectors
- Add vectors: magnitude & direction to component
- Parametric representations of lines

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Vector intro for linear algebra

A vector has both magnitude and direction. We use vectors to, for example, describe the velocity of moving objects. In this video, you'll learn how to write and draw vectors. Created by Sal Khan.

## Want to join the conversation?

- People say i am to young for liner algebra, I am in 6th grade is that true?(21 votes)
- you guys know they wrote that years ago.(13 votes)

- What is a vector(0 votes)
- A vector is a quantity or phenomenon that has two independent properties: magnitude and direction. The term also denotes the mathematical or geometrical representation of such a quantity.

Examples of vectors in nature are velocity, momentum, force, electromagnetic fields, and weight. (Weight is the force produced by the acceleration of gravity acting on a mass.) A quantity or phenomenon that exhibits magnitude only, with no specific direction, is called a scalar . Examples of scalars include speed, mass, electrical resistance, and hard-drive storage capacity.(3 votes)

- I'm confused about why you can have a speed as a magnitude. Shouldn't a magnitude be a
*distance*instead of a speed? Aren't cartesian coordinate systems supposed to convey placement instead of some obscure km/h / mph value?(5 votes)- Vectors can represent anything. Usually they represent position in an x, y, and z coordinate, but they're often used to show velocity in the x, y, and z direction or even acceleration in those directions. Many 2D graphics programs use an R4 vector system with matrices to represent an image's position, skew, rotation, etc.. Magnitude is nothing more than a number, so a vector with a magnitude of 5 could mean that something's 5 units from the point of origin, or that it's moving at 5 units per second or that there's 5 particles passing through a point per second. There's really no limit to the things you can represent with vectors.(16 votes)

- When i build a matrix of my vector in a 2 dimensions plan, do I need to build it 2 in rows and 1 column or it works on a 1 row and 2 columns matrix? Sorry for bad english.. Thanks(10 votes)
- When we start using matrices we write vectors as columns. So a 2-dimensinoal vector would have 2 rows and 1 column. This can be confusing because people will often write a vector as a string of number like (1,2) but they really mean a column vector. It should make more sense when you start using matrices to transform vectors into other vectors.(2 votes)

- How is the subject "linear algebra" different from "abstract algebra"?(5 votes)
- Abstract algebra is the set of advanced topics of algebra that deal with abstract algebraic structures rather than the usual number systems. The most important of these structures are groups, rings, and fields. However, Linear algebra is the branch of mathematics concerning vector spaces and linear mappings between such spaces. It includes the study of lines, planes, and subspaces, but is also concerned with properties common to all vector spaces.(12 votes)

- How would you draw out a vector of more than 3 dimensions?(4 votes)
- You wouldn't - We simply can't "draw" a vector of more than 3 dimensions. What we can do, however, is use some clever tricks to represent the fourth spatial dimension as something else. One could, for instance, make a small movie, where every second elapsed is equal to moving one unit on the fourth dimension. Another trick is to colour-code the vector, trying to represent it's coordinates in the fourth axis as a change in it's colours.

So, in essence, you can't really "draw" a 4D vector, but we can get clever in how to convey it's meaning.(9 votes)

- Can anyone recommend a good linear algebra book? It'll be my second time seeing Linear Algebra.(5 votes)
- if you're already familiar with linear algebra, i would recommend looking through linear algebra again in a more theoretical way, AKA with vector spaces and axioms. the proofy version of linear algebra. this is, dare i say it, the right way to learn linear algebra.(6 votes)

- R^2 or R^3 means that it is the real number space multiplied by itself twice or three times? I am having a hard time seeing if that notation is supposed to be exponential or not...(3 votes)
- Yes it is exponentiation, but not in the "standard" notion of multiplication. The multiplication done here is an operation on sets, the operation being called the "Cartesian Product". If A and B are two sets, then we denote their Cartesian product as AxB, or BxA depending on the order. Note the order does matter, as AxB is in general not equal to BxA. The set AxB is the set of ordered pairs (x, y), where x is in A, and y is in B.

So RxR=R^2 is the collection of ordered pairs (x, y), where both x and y are real numbers. Likewise, the double Cartesian Product (RxR)xR=Rx(RxR)=R^3 is the collection of ordered triples (x, y, z), where x, y, and z are all real numbers.(9 votes)

- What would happen if a vector was (0,0) lr would it not be a vector because it has no magnitude or direction(3 votes)
- It has a magnitude of 0, but no direction. It is indeed a vector. I would highly recommend not thinking of vectors as things with direction and magnitude, because you will see later on in linear algebra that this leads to a lot of confusion as to what vectors actually are. Just for now, think of vectors as a coordinate in some cartesian space, like 3d space or the xy plane.(6 votes)

- It would be amazing if you added quizzes to the entirety of linear algebra course. In the other courses this helped me a tremendous amount and the lack of the quizzes here are keeping me from retaining the information. Thank you a ton, Khan academy!(5 votes)

## Video transcript

A vector is something that has
both magnitude and direction. Magnitude and direction. So let's think of an example
of what wouldn't and what would be a vector. So if someone tells
you that something is moving at 5 miles per hour,
this information by itself is not a vector quantity. It's only specifying
a magnitude. We don't know what
direction this thing is moving 5 miles per hour in. So this right over
here, which is often referred to as a speed, is not a
vector quantity just by itself. This is considered to
be a scalar quantity. If we want it to be a
vector, we would also have to specify the direction. So for example,
someone might say it's moving 5 miles
per hour east. So let's say it's moving
5 miles per hour due east. So now this combined 5
miles per are due east, this is a vector quantity. And now we wouldn't
call it speed anymore. We would call it velocity. So velocity is a vector. We're specifying the
magnitude, 5 miles per hour, and the direction east. But how can we actually
visualize this? So let's say we're
operating in two dimensions. And what's neat
about linear algebra is obviously a lot
of what applies in two dimensions
will extend to three. And then even four, five, six,
as made dimensions as we want. Our brains have trouble
visualizing beyond three. But what's neat is
we can mathematically deal with beyond three
using linear algebra. And we'll see that
in future videos. But let's just go back to
our straight traditional two-dimensional vector
right over here. So one way we
could represent it, as an arrow that
is 5 units long. We'll assume that each of our
units here is miles per hour. And that's pointed
to the right, where we'll say the right is east. So for example, I could start
an arrow right over here. And I could make its length 5. The length of the arrow
specifies the magnitude. So 1, 2, 3, 4, 5. And then the direction
that the arrow is pointed in specifies
it's direction. So this right over here could
represent visually this vector. If we say that the
horizontal axis is say east, or the positive horizontal
direction is moving in the east, this would be
west, that would be north, and then that would be south. Now, what's interesting
about vectors is that we only care about the magnitude
in the direction. We don't necessarily
not care where we start, where we place it when we think
about it visually like this. So for example, this would
be the exact same vector, or be equivalent vector to this. This vector has the same length. So it has the same magnitude. It has a length of 5. And its direction
is also due east. So these two vectors
are equivalent. Now one thing that you might say
is, well, that's fair enough. But how do we represent
it with a little bit more mathematical notation? So we don't have to
draw it every time. And we could start
performing operations on it. Well, the typical
way, one, if you want a variable to
represent a vector, is usually a lowercase letter. If you're publishing a
book, you can bold it. But when you're doing
it in your notebook, you would typically put a
little arrow on top of it. And there are several
ways that you could do it. You could literally say,
hey 5 miles per hour east. But that doesn't feel
like you can really operate on that easily. The typical way is to specify,
if you're in two dimensions, to specify two
numbers that tell you how much is this vector moving
in each of these dimensions? So for example,
this one only moves in the horizontal dimension. And so we'll put our
horizontal dimension first. So you might call
this vector 5, 0. It's moving 5, positive 5
in the horizontal direction. And it's not moving at all
in the vertical direction. And the notation might change. You might also see notation, and
actually in the linear algebra context, it's more
typical to write it as a column vector
like this-- 5, 0. This once again,
the first coordinate represents how much we're moving
in the horizontal direction. And the second coordinate
represents how much are we moving in the
vertical direction. Now, this one isn't
that interesting. You could have other vectors. You could have a vector
that looks like this. Let's say it's moving 3 in
the horizontal direction. And positive 4. So 1, 2, 3, 4 in the
vertical direction. So it might look
something like this. So this could be another
vector right over here. Maybe we call this
vector, vector a. And once again, I want to
specify that is a vector. And you see here that if
you were to break it down, in the horizontal direction,
it's shifting three in the horizontal direction,
and it's shifting positive four in the vertical direction. And we get that by
literally thinking about how much we're moving
up and how much we're moving to the right when we
start at the end of the arrow and go to the front of it. So this vector might
be specified as 3, 4. 3, 4. And you could use the
Pythagorean theorem to figure out the actual
length of this vector. And you'll see because this is
a 3, 4, 5 triangle, that this actually has a magnitude of 5. And as we study more
and more linear algebra, we're going to start extending
these to multiple dimensions. Obviously we can visualize
up to three dimensions. In four dimensions it
becomes more abstract. And that's why this type
of a notation is useful. Because it's very hard to draw
a 4, 5, or 20 dimensional arrow like this.