Main content

## Linear algebra

### Course: 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

# Parametric representations of lines

Parametric Representations of Lines in R2 and R3. Created by Sal Khan.

## Want to join the conversation?

- How would you use this in real life?(108 votes)
- You may want to describe the motion of a particule, say an electron. Then you need the representation of this path. Think about the parameter t as the time.(297 votes)

- How can a line be represented in 50 dimensions?What are its real-time applications?I mean, what is the need of a line represented in 50 dimensions.(35 votes)
- You can't graphically represent a line in 50 dimensions, because we only have three spacial dimensions to work with. A line in 50 dimensions would just be a representation of a set of values. Think of it, like this: In two dimensions I can solve for a specific point on a function or I can represent the function itself via an equation (i.e. a line). In three dimensions I can represent a point on a function or a line of a function or the function itself (a plane). So, in 50 dimensions a line would represent a range of specific values of a function.

Real-world applications would involve 50 different variables, e.g.: quantity of flavours of ice-cream (Strawberry, Chocolate, Vanilla, Blueberry, ... etc.) and the cost of an amount of a specific flavour. Then a line could be a representation of an optimal set of values for the quantity of ice-cream for each flavour at the lowest cost.

I hope that helps. (Please correct me if I'm wrong)(118 votes)

- Towards the end of the video Sal comments that in R3, R4...Rn spaces - we need a parametric equation to define a line. Is there a reason why? Is it becuase we introducing a 4th unknown to solve for t and thus reducing a plane (e.g. x+y+z=1) to a line? If this is correct, what happens if we introduce 2 unknowns (e.g. t+u) into a parametric equation? Do we get a point?(58 votes)
- For a system of m equations in n unknowns, where n >= (greater than or equal to) m, the solution will form an (n - m)space. So for one equation with one unknown like x = 7, the solution is a 0-space (a single point). For one equation in two unknowns like x + y = 7, the solution will be a (2 - 1 = 1)space (a line). For one equation in 3 unknowns like x + y + z = 7, the solution will be a 2-space (a plane).

For a system of parametric equations, this holds true as well. By strategically adding a new unknown, t, and breaking up the other unknowns into individual equations so that they each vary with regard only to t, the system then becomes n equations in n + 1 unknowns. The solution to this system forms an [(n + 1) - n = 1]space (a line).

If another unknown were added to the mix, the solution would actually end up being a 2-space (a plane).(197 votes)

- What is collinear?(26 votes)
- "collinear" = "In the same line"

For example,

Any two points are colinear (because you can draw a line between them),

Two opposite points in a circle and its center are colinear.

Colinearity is interesting with three or more points.(47 votes)

- (13m:43s) Can we instead of doing b-a do a-b?(31 votes)
- Yes you can, as the only change is in the direction and lines don't have directions.(34 votes)

- When determining the equation for L he says that it doesn't matter whether or not you were to use P1+t[P2-P1] or P2+t[P1-P2] or any other variation, or this is at least how I understood it. How is this possible if each variation provides you with different parametric equations? I attempted to apply this method to a problem from my calc txtbook and i found that the answer from the back of the book only corresponds with one of the forms of the equation.(17 votes)
- Does your textbook say to find "a" set of parametric equations, or "the" set? Parametrizations for a given line are not unique, so your book should say "answers may vary", or something. Or, the problem would have to give you more information than the two points. If you look at t as a time parameter (you don't have to), you can think of different parametrizations of the same line as two particles going perhaps in opposite directions, or different speeds, but along the same path.(15 votes)

- I'm looking for info on dilation of a triangle with a scale factor. Could someone point me to that video if it exists, please?(5 votes)
- Just multiply the coordinates of the triangle by the scale factor.(32 votes)

- How would someone reading the set S = {c
**v**| c ( R} know that it represents only the line in R^2 going through the point (0, 0)?

Earlier on, we defined vectors such that**v**can be started anywhere on the Cartesian plane , not just the origin. Therefore, the set S should represent*all*lines in R^2 with the same slope as vector**v**.

I know that at4:40, Sal makes the clarification that this is only if we define**v**as the position vector version of**v**, which starts only at the origin. But when writing the set S, is there a way (a notation of some sort) to clarify that c**v**represents only the set of all scaled position vectors**v**, rather than just*all***v**? Because otherwise, adding the**x**vector later on would make literally no difference to S. You'd just be taking an infinite number of lines in R^2 and moving all of them by**x**, which would have no visible effect.(11 votes)- In Linear Algebra, we only consider a vector as an object referenced from the origin. In other words, we cannot move vectors wherever we want in Linear Algebra.

However such a practice of allowing a vector**v**to be anywhere we want is acceptable in a class like Multivariable Calculus.(6 votes)

- Wait a minute...could you actually describe the path of a fly with a parametric equation, if the path were not a straight line? Or was he just referring to straight lines?(11 votes)
- I think the confusion with the non-straight lines (or at least my confusion with it) derived from the fact that in the video, sal was showing us parameterization with just a straight line. The functions in this video always produced straight lines because they were of the form mx + b. It does not have to stay in that form though. You could make a function like x= t^3 + 3, y= t^2 , z= t^.5 + 2t. Here is a graph of that function I just stated to visualize it: http://www.wolframalpha.com/input/?i=plot+%7Bx+%3Dt%5E3+%2B+3%2C+y%3Dt%5E2%2C+z%3Dt%5E.5+%2B+2t%7D(6 votes)

- sal, when your using the scalier "t" does that represent time?(4 votes)
- t (here) is just a random variable, but in physics that would mean time yes.(18 votes)

## Video transcript

Everything we've been doing in
linear algebra so far, you might be thinking, it's kind of
a more painful way of doing things that you already
knew how to do. You've already dealt
with vectors. I'm guessing that some of you
all have already dealt with vectors in your calculus or
your pre-calculus or your physics classes. But in this video I hope to show
you something that you're going to do in linear algebra
that you've never done before, and that it would have been very
hard to do had you not been exposed to these videos. Well I'm going to start with,
once again, a different way of doing something you already
know how to do. So let me just define some
vector here, instead of making them bold, I'll just draw it
with the arrow on top. I'm going to define my vector
to be-- I can do with the arrow on top or I can just
make it super bold. I'm just going to define my
vectors, it's going to be a vector in R2. Let's just say that my vector
is the vector 2, 1. If I were to draw it in
standard position, it looks like this. You go two to the right,
up one, like that. That's my, right there,
that is my vector v. Now, if I were to ask you, what
are all of the possible vectors I can create? So let me define a set. Let me define a set, s, and
it's equal to-- all of the vectors I can create, if I were
to multiply v times some constant, so I multiply some
constant, some scalar, times my vector v, and just to maybe
be a little bit formal, I'll say such that c is a member
of the real numbers. Now what would be a graphical
representation of this set? Well, if we draw them all in
standard position, c could be any real number. So if I were to multiply,
c could be 2. If c is 2, let me
do it this way. If I do 2 times our vector,
I'm going to get the vector 4, 2. Let me draw that in standard
position, 4, 2. It's right there. It's this vector right there. It's collinear with
this first vector. It's along the same line, but
just goes out further 2. Now I could've done another. I could have done 1.5
times our vector v. Let me do that in a
different color. And maybe that would be,
that would be what? That'd be 1.5 times 2,
which is 3, 1.5. Where would that
vector get me? I'd go one 1.5 and then I'd
go 3, and then 1.5, I'd get right there. And I can multiply
by anything. I can multiply 1.4999
times vector v, and get right over here. I could do minus 0.0001
times vector v. Let me write that down. I could do 0.001 times
our vector v. And where were that put me? It would put me little super
small vector right there. If I did minus 0.01, it would
make a super small vector right there pointing
in that direction. If I were to do minus 10, I
would get a vector going in this direction that goes
way like that. But you can imagine that if
I were to plot all of the vectors in standard position,
all of them that could be represented by any c in real
numbers, I'll essentially get-- I'll end up drawing a
bunch of vectors where their arrows are all lined up along
this line right there, and all lined up in even in negative
direction-- let me make sure I draw it properly-- along
that line, like that. I think you get the idea. So it's a set of collinear
vectors. So let me write that down. And if we view these vectors as
position vectors, that this vector represents a point in
space in R2-- this R2 is just our Cartesian coordinate plane
right here in every direction-- if we view this
vector as a position vector-- let me write that down-- if
we view it as kind of a coordinate in R2, then this set,
if we visually represent it as a bunch of position
vectors, it'll be represented by this whole line over here. And I want to make that point
clear because it's essentially a line, of slope 2. Right? Sorry, slope 1/2. Your rise is 1. Your rise is 1 for
going over 2. But I don't want to go
back to our Algebra 1 notation too much. But I want to make this point
that this line of slope 2 that goes through the origin, this
is if we draw all of the vectors in the set as in their
standard form, or if we draw them all as position vectors. If I didn't make that
clarification, or that qualification, I could have
drawn these vectors anywhere. Right? Because this 4, 2 vector, I
could have drawn over here. And then, to say that it's
collinear probably wouldn't have made as much visual
sense to you. But I think this collinearity of
it makes more sense to you if you say, oh, let's draw them
all in standard form. All of them start at the origin,
and then their tails are at the origin, and their
heads go essentially to the coordinate they represent. That's what I mean by their
position vectors. They don't necessarily have to
be position vectors, but for the visualization in this video,
let's stick to that. Now I was only able to represent
something that goes through the origin
with this slope. So you can almost view that
this vector kind of represented its slope. You almost want to view it as a
slope vector, if you wanted to tie it in to what you
learned in Algebra 1. What if we wanted to represent
other lines that had that slope? What if we wanted to represent
the the same line, or I guess a parallel line-- that goes
through that point over there, the point 2 comma 4? Or if we're thinking in position
vectors, we could say that point is represented
by the vector, and we will call that x. It's represented by
the vector x. And the vector x is
equal to 2, 4. That point right there. What if I want to represent the
line that's parallel to this that goes through
that point 2, 4? So I want to represent
this line right here. I'll draw it as parallel
to this as I can. I think you get the idea, and it
just keeps going like that in every direction. These two lines are parallel. How can I represent the set of
all of these vectors, drawn in standard form, or all of the
vectors, that if I were to draw them in standard form,
would show this line? Well, you can think
about it this way. If every one of the vectors that
represented this line, if I start with any vector that was
on this line, and I add my x vector to it, I'll show up
at a corresponding point on this line that I
want to be at. Right? Let's say I do negative 2 times
my original, so minus 2 times my vector v, that
equaled what? Minus 4, minus 2, so that's
that vector there. But if I were to add x to it, if
I were to add my x vector. So if I were to do minus 2 times
my vector v, but I were to add x to it, so plus x. I'm adding this vector 2 comma
4 to it, so from here I'd go right 2 and up 4,
so I'd go here. Or visually you could just
say, heads to tails, so I would go right there. So I would end up at a corresponding point over there. So when I define my set, s, as
the set of all points where I just multiply v times the
scalar, I got this thing that went through the origin. But now let me define
another set. Let me define a set l, maybe l
for line, that's equal to the set of all of vectors where the
vector x, I could do it bold or I'll just draw an
arrow on it, plus some scalar-- I could use c, but
let me use t, because I'm going to call this a
parametrization of the line-- so plus some scalar, t times my
vector v such that t could be any member of the
real numbers. So what is this going to be? This is going to be
this blue line. If I were to draw all of these
vectors in standard position, I'm going to get my blue line. For example, if I do minus 2,
this is minus 2, times my vector v, I get here. Then if I add x, I go there. So this vector right here that
has its endpoint right there-- its endpoint sits
on that line. I can do that with anything. If I take this vector, this is
some scalar times my vector v, and I add x to it, I end up
with this vector, whose endpoint, if I view it as a
position vector, it's endpoint dictates some coordinate
in the xy plane. So it will [UNINTELLIGIBLE] that point. So I can get to any
of these vectors. This is a set of vectors right
here, and all of these vectors are going to point-- they're
essentially going to point to something-- when I draw them
in standard form, if I draw them in standard form-- they're
going to point to a point on that blue line. Now you might say, hey Sal, this
was a really obtuse way of defining a line. I mean we do it in Algebra 1,
where we just say, hey you know, y is equal to mx plus b. And we figure out the slope by
figuring out the difference of two points, and then we do
a little substitution. And this is stuff you learned
in seventh or eighth grade. This was really straightforward. Why am I defining this obtuse
set here and making you think in terms of sets and vectors
and adding vectors? And the reason is, is because
this is very general. This worked well in R2. So in R2, this was great. I mean, we just have to worry
about x's and y's. But what about the situation, I
mean notice, in your algebra class, your teacher never really
told you much, at least in the ones I took, about how do
you present lines in three dimensions? Maybe some classes go there,
but they definitely didn't tell you how do you represent
lines in four dimensions, or a hundred dimensions. And that's what this is
going to do for us. Right here, I defined x and
v as vectors in R2. They're two-dimensional vectors,
but we can extend it to an arbitrary number
of dimensions. So just to kind of hit the point
home, let's do one more example in R2, where, it's kind
of the classic algebra problem where you need to find
the equation for the line. But here, we're going
to call it the set definition for the line. Let's say we have two vectors. Let's say we have the vector a,
which I'll define as-- let me just says it's 2, 1. So if I were draw it in standard
form, it's 2, 1. That's my vector
a, right there. And let's say I have vector
b, let me define vector b. I'm going to define it as,
I don't know, let me define it as 0, 3. So my vector b, 0-- I don't
move to the right at all and I go up. So my vector b will
look like that. Now I'm going to say that these
are position vectors, that we draw them in
standard form. When you draw them in standard
form, their endpoints represent some position. So you can almost view these
as coordinate points in R2. This is R2. All of these coordinate axes
I draw are going be R2. Now what if I asked you, give
me a parametrization of the line that goes through
these two points. So essentially, I want the
equation-- if you're thinking in Algebra 1 terms-- I want the
equation for the line that goes through these two points. So the classic way, you would
have figured out the slope and all of that, and then
you would have substituted back in. But instead, what we can do is,
we can say, hey look, this line that goes through both of
those points-- you could almost say that both of those
vectors lie on-- I guess that's a better-- Both of these vectors lie on this line. Now, what vector can be
represented by that line? Or even better, what vector,
if I take any arbitrary scalar-- can represent any other
vector on that line? Now let me do it this way. What if I were to take-- so this
is vector b here-- what if I were to take b minus a? We learned in, I think it was
the previous video, that b minus a, you'll get this
vector right here. You'll get the difference
in the two vectors. This is the vector b
minus the vector a. And you just think about it. What do I have to add
to a to get to b? I have to add b minus a. So if I can get the vector b
minus a-- right, we know how to do that. We just subtract the vectors,
and then multiply it by any scalar, then we're going to get
any point along that line. We have to be careful. So what happens if we take t,
so some scalar, times our vector, times the vectors
b minus a? What will we get then? So b minus a looks like that. But if we were to draw it in
standard form-- remember, in standard form b minus a would
look something like this. Right? It would start at 0, it would be
parallel to this, and then from 0 we would draw
its endpoint. So if we just multiplied some
scalar times b minus a, we would actually just get
points or vectors that lie on this line. Vectors that lie on that
line right there. Now, that's not what
we set out to do. We wanted to figure out an
equation, or parametrization, if you will, of this
line, or this set. Let's call this set l. So we want to know what
that set is equal to. So in order to get there, we
have to start with this, which is this line here, and
we have to shift it. And we could shift it either by
shifting it straight up, we could add vector b to it. So we could take this
line right here, and add vector b to it. And so any point on here
would have its corresponding point there. So when you add vector b, it
essentially shifts it up. That would work. So we could, say, we could
add vector b to it. And now all of these points
for any arbitrary-- t is a member of the real numbers, will
lie on this green line. Or the other option we could
have done is we could have added vector a. Vector a would have taken any
arbitrary point here and shifted it that way. Right? You would be adding
vector a to it. But either way, you're going to
get to the green line that we cared about, so you could
have also defined it as the set of vector a plus this line,
essentially, t times vector b minus a, where t is
a member of the reals. So my definition of
my line could be either of these things. The definition of my line could
be this set, or it could be this set. And all of this seems all very
abstract, but when you actually deal with the numbers,
it actually becomes very simple. It becomes arguably simpler than
what we did in Algebra 1. So this l, for these particular
case of a and b, let's figure it out. My line is equal to-- let me
just use the first example. It's vector b, so it's the
vector 0, 3 plus t, times the vector b minus a. Well what's b minus a? 0 minus 2 is minus 2, 3, minus
1 is 2, for t is a member of the reals. Now, if this still seems kind
of like a convoluted set definition for you, I could
write it in terms that you might recognize better. If we want to plot points, if
we call this the y-axis, and we call this the x-axis,
and if we call this the x-coordinate, or maybe more
properly that the x-coordinate and call this the y-coordinate,
then we can set up an equation here. This actually is the x-slope. This is the x-coordinate,
that's the y-coordinate. Or actually, even better,
whatever-- actually, let me be very careful there. This is always going to end up
becoming some vector, l1, l2. Right? This is a set of vectors, and
any member of this set is going to look something
like this. So this could be li. So, this is the x-coordinate,
and this is the y-coordinate. And just to get this in a form
that you recognize, so we're saying that l is the set of
this vector x plus t times this vector b minus a here. If we wanted to write it in kind
of a parametric form, we can say, since this is what
determines our x-coordinate, we would say that x is equal to
0 plus t times minus 2, or minus 2 times t. And then we can say that y,
since this is what determines our y-coordinate, y is equal to
3 plus t times 2 plus 2t. So we could have rewritten that
first equation as just x is equal to minus 2t, and
y is equal to 2t plus 3. So if you watch the videos on
parametric equations, this is just a traditional parametric
definition of this line right there. Now, you might have still viewed
this as, Sal, this was a waste of time, this
was convoluted. You have to define these
sets and all that. But now I'm going to show you
something that you probably-- well, unless you have done
this before, but I guess that's true of anything. But you probably haven't
seen in your traditional algebra class. Let's say I have two points, and
now I'm going to deal in three dimensions. So let's say I have
one vector. I'll just call it point
1, because these are position vectors. We'll just call it position 1. This is in three dimensions. Just make up some numbers,
negative 1, 2, 7. Let's say I have Point 2. Once again, this is in three
dimensions, so you have to specify three coordinates. This could be the x, the y,
and the z coordinate. Point 2, I don't know. Let's make it 0, 3, and 4. Now, what if I wanted to find
the equation of the line that passes through these
two points in R3? So this is in R3. Well, I just said that the
equation of this line-- so I'll just call that, or the set
of this line, let me just call this l. It's going to be equal to-- we
could just pick one of these guys, it could be P1, the
vector P1, these are all vectors, be careful here. The vector P1 plus some random
parameter, t, this t could be time, like you learn when you
first learn parametric equations, times the difference
of the two vectors, times P1, and it doesn't matter
what order you take it. So that's a nice thing too. P1 minus P2. It could be P2 minus P1--
because this can take on any positive or negative value--
where t is a member of the real numbers. So let's apply it to
these numbers. Let's apply it right here. What is P1 minus P2? P1 minus P2 is equal to-- let
me get some space here. P1 minus P2 is equal, minus
1 minus 0 is minus 1. 2 minus 3 is minus 1. 7 minus 4 is 3. So that thing is that vector. And so, our line can be
described as a set of vectors, that if you were to plot it in
standard position, it would be this set of position vectors. It would be P1, it would be--
let me do that in green-- it would be minus 1, 2, 7. I could've put P2 there, just as
easily-- plus t times minus 1, minus 1, 3, where, or such
that, t is a member of the real numbers. Now, this also might not
be satisfying for you. You're like, gee, how do I plot
this in three dimensions? Where's my x, y's, and z's? And if you want to care about
x, y's, and z's, let's say that this is the z-axis. This is the x-axis, and
let's say the y-axis. It kind of goes into our board
like this, so the y-axis comes out like that. So what you can do, and actually
I probably won't graph, so the determinate for
the x-coordinate, just our convention, is going to be
this term right here. So we can write that x--
let me write that down. So that term is going to
determine our x-coordinate. So we can write that x is equal
to minus 1-- be careful with the colors-- minus 1,
plus minus 1 times t. That's our x-coordinate. Now, our y-coordinate is going
to be determined by this part of our vector addition because
these are the y-coordinates. So we can say the y-coordinate
is equal to-- I'll just write it like this-- 2 plus
minus 1 times t. And then finally, our
z-coordinate is determined by that there, the t shows up
because t times 3-- or I could just put this t into
all of this. So that the z-coordinate is
equal to 7 plus t times 3, or I could say plus 3t. And just like that, we have
three parametric equations. And when we did it in R2, I did
a parametric equation, but we learned in Algebra 1,
you can just have a regular y in terms x. You don't have to have a
parametric equation. But when you're dealing in R3,
the only way to define a line is to have a parametric
equation. If you have just an equation
with x's, y's, and z's, if I just have x plus y plus z is
equal to some number, this is not a line. And we'll talk more
about this in R3. This is a plane. The only way to define a line
or a curve in three dimensions, if I wanted to
describe the path of a fly in three dimensions, it has to
be a parametric equation. Or if I shoot a bullet in three
dimensions and it goes in a straight line, it has to
be a parametric equation. So these-- I guess you could
call it-- these are the equations of a line in
three dimensions. So hopefully you found
that interesting. And I think this will be the
first video where you have an appreciation that linear algebra
can solve problems or address issues that you
never saw before. And there's no reason why we
have to just stop at three, three coordinates, right here. We could have done this
with fifty dimensions. We could have defined a line in
fifty dimensions-- or the set of vectors that define a
line, that two points sit on, in fifty dimensions-- which is
very hard to visualize, but we can actually deal with
it mathematically.