Linear algebra part 3 - Scalar multiplication and linear combinations
Scalar is the mathematical term for something that only has a single dimension,
i.e. a number. In this lesson we will learn how to multiply one-dimensional
scalars with multi-dimensional vectors.
When we multiple a vectors by a scalar, we multiply each element of the vector
by the scalar. The result is a vector with the same number of dimensions as the
original vector. Multiplying the scalar c with vector
v looks like this.
cv=cv1v2v3⋮vn=cv1cv2cv3⋮cvn
To make that a bit more tangible, let us put some real numbers to it.
c=2,v=170
cv=2170=2⋅12⋅72⋅0=2140
If you have not come across the dot notation for multiplication before, it is no
different to the normal times symbol. In the equation above, treat
2⋅1 exactly like 2×1.
Linear combinations of vectors
We learnt how to add vectors together in the first linear algebra post.
We can combine our knowlege of adding and subtracting vectors which scalar
multiplication to create linear combinations of vectors. If we have vectors
v and w, and scalars c
and d, the general form of the linear combination looks like this:
You can create linear combinations of as many vectors as you like, with as many
dimensions as you like. Let us look at a numeric example with three vectors and
three scalars.
An interesting question we can now ask is what happens when we consider all linear
combinations of linear combinations. Take the scalar multiplication of cv
and consider what that looks like for different values of c. Let
us define v as a two dimensional vector.
v=[17]
Now let us calculate and plot cv for different values
of c, ranging from −3 to 3. If
you are unfamiliar with plotting vectors review the last post.
c=−3→cv=−3[17]=[−3−21]
c=−2→cv=−2[17]=[−2−14]
c=−1→cv=−3[17]=[−1−7]
c=0→cv=0[17]=[00]
c=1→cv=1[17]=[17]
c=2→cv=2[17]=[214]
c=3→cv=−3[17]=[321]
Plotting those points on a graph you can see they all fall along a straight line.
Consider what would happen if you plotted every value of c. All
the way from −∞ to ∞. Not just integers,
but all the decemal value of c: c=1.1,
c=1.2, c=1.2345... and so on. If you imagine
plotting cv for every value of c it
would completely fill that line, from −∞ to ∞.
In math notation we call the space occupied by an infinitely long line
R. The space occupied by an infinitely large two-dimensional
plane is R2. An infinitely large three-dimensional
space is R3, and so on. We can therefore say that
cv for every value of c fills
R.
The number of components in the vector v does not affect
the fact that cv for every value of c
fills R. If v has one dimension,
a number, then cv for every value of c
would fill a single line. This is the number line we are all familiar with. If
v has two dimension then we need two axis to plot the
line it fills, as we saw in the example above. If v has
three dimensions, we would need three axis to plot the line, but
cv for every value of c will still
fill a single line.
All combinations of cv+dw fill a plane
A linear combination of two vectors and two scalars will fill a plane,
R2. We have shown that cv
for every value of c will fill a line. If we take the linear
combination of a different vector, w, and scalar,
d, then dw for every value of
d will also fill a line.
Think of these two lines created by cv and
dw as the two axis of a graph. specifying values on
either one only allows us to move along that axis. But if we specify values on both
at once, we can specify a point anywhere in that two dimensional space. If we take
every value of c and d, it will fill that
two-dimensional plane.
Linear combinations of more vectors
If all linear combinations of a single vector fill a one-dimensional line, and
all linear combinations of two vectors fill a two-dimensional plane, it is not a
big leap to say that all linear combinations of three vectors will fill a three-dimensional
space, R3. Think of the third vector as the third axis
of a graph. Consider all linear combinations of
cv+dw+ex: All the linear
combinations of cv contain every point on one axis.
All linear combinations of dw contain every point on
the second axis. All linear combinations of ex
contain every point on the third axis. Combining all three will contain every
point in that three dimensional space.
This logic continues for linear combinations of as many vectors as you have.
All linear combinations of four vectors will fill four dimensional space,
R4, all linear combinations of five vectors will fill
five dimensional space, R5, and so on. (But good luck
trying to picture those!)
Exceptions to the rule
If any of the vectors you are add together are in the same plane as each other,
their linear combinations will not behave as expected. If you are adding the
linear combinations of two vectors, and those two vectors are parallel, combinations
of the two vectors do not create a two-dimensional space. If you consider the linear
combinations of three vectors, if the third vector sits in the two dimensional plane
created by the first two, it will not add a third dimension. When thinking about how
many dimensions the linear combinations of vectors fills, it is important to consider
if any of them are in the same plane.
Problems
If you can solve these problems you have understood scalar multiplication and
linear combinations of vectors.
Calculate the scalar multiplication cv, if:
c=3,v=251
Calculate the linear combination cv+dw,
if:
d=2,w=139
Will all linear combinations of cv+dw
fill a line, plane or space?
Solutions
To multiply a vector by a scalar, multiply each component of the vector by
the scalar, creating a new vector with the same number of components.
cv=3251=3⋅23⋅53⋅1=6153
To find linear combination cv+dw
first calculate the individual scalar multiplications, then sum the components:
All linear combinations of two vectors fill a plane. The only exception would
be if the two vectors are parallel. You can prove that the vectors in this example
are not parallel by plotting them. If you need a refresher on how to plot vectors
have a look at this post.