Euclidean vectors Let the field
K be the set
R of
real numbers, and let the vector space
V be the
Euclidean space R3. Consider the vectors , and . Then
any vector in
R3 is a linear combination of
e1,
e2, and
e3. To see that this is so, take an arbitrary vector (
a1,
a2,
a3) in
R3, and write: : \begin{align} ( a_1 , a_2 , a_3) & = ( a_1 ,0,0) + (0, a_2 ,0) + (0,0, a_3) \\[6pt] & = a_1 (1,0,0) + a_2 (0,1,0) + a_3 (0,0,1) \\[6pt] & = a_1 \mathbf e_1 + a_2 \mathbf e_2 + a_3 \mathbf e_3. \end{align}
Functions Let
K be the set
C of all
complex numbers, and let
V be the set C
C(
R) of all
continuous functions from the
real line R to the
complex plane C. Consider the vectors (functions)
f and
g defined by
f(
t) :=
eit and
g(
t) :=
e−
it. (Here,
e is the
base of the natural logarithm, about 2.71828..., and
i is the
imaginary unit, a square root of −1.) Some linear combinations of
f and
g are: • \cos t = \tfrac12 \, e^{i t} + \tfrac12 \, e^{-i t} • 2 \sin t = (-i) e^{i t} + (i) e^{-i t}. On the other hand, the constant function 3 is
not a linear combination of
f and
g. To see this, suppose that 3 could be written as a linear combination of
eit and
e−
it. This means that there would exist complex scalars
a and
b such that for all real numbers
t. Setting
t = 0 and
t = π gives the equations and , and clearly this cannot happen.
Polynomials Let
K be
R,
C, or any field, and let
V be the set
P of all
polynomials with coefficients taken from the field
K. Consider the vectors (polynomials)
p1 := 1, , and . To find out whether
x2 − 1 is a linear combination of
p1,
p2, and
p3, we consider an arbitrary linear combination of these vectors and try to see when it equals the desired vector
x2 − 1. Picking arbitrary coefficients
a1,
a2, and
a3, we want : a_1 (1) + a_2 ( x + 1) + a_3 ( x^2 + x + 1) = x^2 - 1. Multiplying the polynomials out, this means : ( a_1 ) + ( a_2 x + a_2) + ( a_3 x^2 + a_3 x + a_3) = x^2 - 1 and collecting like powers of
x, we get : a_3 x^2 + ( a_2 + a_3 ) x + ( a_1 + a_2 + a_3 ) = 1 x^2 + 0 x + (-1). Two polynomials are equal
if and only if their corresponding coefficients are equal, so we can conclude : a_3 = 1, \quad a_2 + a_3 = 0, \quad a_1 + a_2 + a_3 = -1. This
system of linear equations can easily be solved. First, the first equation simply says that
a3 is 1. Knowing that, we can solve the second equation for
a2, which comes out to −1. Finally, the last equation tells us that
a1 is also −1. Therefore, the only possible way to get a linear combination is with these coefficients. Indeed, : x^2 - 1 = -1 - ( x + 1) + ( x^2 + x + 1) = - p_1 - p_2 + p_3 so
x2 − 1
is a linear combination of
p1,
p2, and
p3. On the other hand, if we try to make
x3 − 1 a linear combination of
p1,
p2, and
p3, then following the same process as before, we get the equation : \begin{align} & 0 x^3 + a_3 x^2 + ( a_2 + a_3 ) x + ( a_1 + a_2 + a_3 ) \\[5pt] = {} & 1 x^3 + 0 x^2 + 0 x + (-1). \end{align} However, when we set corresponding coefficients equal in this case, the equation for
x3 is : 0 = 1 which is always false. Therefore, there is no way for this to work, and
x3 − 1 is
not a linear combination of
p1,
p2, and
p3. == The linear span ==