In mathematics, a linear combination or superposition is an expression constructed from a set of terms by multiplying each term by a constant and adding the results (e.g. a linear combination of x and y would be any expression of the form ax + by, where a and b are constants). The concept of linear combinations is central to linear algebra and related fields of mathematics. Most of this article deals with linear combinations in the context of a vector space over a field, with some generalizations given at the end of the article.
Definition Let V be a vector space over the field K. As usual, we call elements of V vectors and call elements of K scalars. If v1,...,vn are vectors and a1,...,an are scalars, then the linear combination of those vectors with those scalars as coefficients is a1𝐯1+a2𝐯2+a3𝐯3+⋯+an𝐯n. There is some ambiguity in the use of the term "linear combination" as to whether it refers to the expression or to its value. In most cases the value is emphasized, as in the assertion "the set of all linear combinations of v1,...,vn always forms a subspace". However, one could also say "two different linear combinations can have the same value" in which case the reference is to the expression. The subtle difference between these uses is the essence of the notion of linear dependence: a family F of vectors is linearly independent precisely if any linear combination of the vectors in F (as value) is uniquely so (as expression). In any case, even when viewed as expressions, all that matters about a linear combination is the coefficient of each vi; trivial modifications such as permuting the terms or adding terms with zero coefficient do not produce distinct linear combinations. In a given situation, K and V may be specified explicitly, or they may be obvious from context. In that case, we often speak of a linear combination of the vectors v1,...,vn, with the coefficients unspecified (except that they must belong to K). Or, if S is a subset of V, we may speak of a linear combination of vectors in S, where both the coefficients and the vectors are unspecified, except that the vectors must belong to the set S (and the coefficients must belong to K). Finally, we may speak simply of a linear combination, where nothing is specified (except that the vectors must belong to V and the coefficients must belong to K); in this case one is probably referring to the expression, since every vector in V is certainly the value of some linear combination. Note that by definition, a linear combination involves only finitely many vectors, except as described in the § Generalizations section. However, the set S that the vectors are taken from (if one is mentioned) can still be infinite; each individual linear combination will only involve finitely many vectors. Also, there is no reason that n cannot be zero; in that case, we declare by convention that the result of the linear combination is the zero vector in V.
Examples and counterexamples
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 e1 = (1,0,0), e2 = (0,1,0) and e3 = (0,0,1). 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: (a1,a2,a3)=(a1,0,0)+(0,a2,0)+(0,0,a3)=a1(1,0,0)+a2(0,1,0)+a3(0,0,1)=a1𝐞1+a2𝐞2+a3𝐞3.
Functions Let K be the set C of all complex numbers, and let V be the set CC(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:
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 aeit + be−it = 3 for all real numbers t. Setting t = 0 and t = π gives the equations a + b = 3 and a + b = −3, and clearly this cannot happen. (See Euler's identity.)
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, p2 := x + 1, and p3 := x2 + x + 1. 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 a1(1)+a2(x+1)+a3(x2+x+1)=x2−1. Multiplying the polynomials out, this means (a1)+(a2x+a2)+(a3x2+a3x+a3)=x2−1 and collecting like powers of x, we get a3x2+(a2+a3)x+(a1+a2+a3)=1x2+0x+(−1). Two polynomials are equal if and only if their corresponding coefficients are equal, so we can conclude a3=1,a2+a3=0,a1+a2+a3=−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, x2−1=−1−(x+1)+(x2+x+1)=−p1−p2+p3 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 0x3+a3x2+(a2+a3)x+(a1+a2+a3)=1x3+0x2+0x+(−1). 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.
Linear span
Take an arbitrary field K, an arbitrary vector space V, and let v1,...,vn be vectors (in V). It is interesting to consider the set of all linear combinations of these vectors. This set is called the linear span (or just span) of the vectors, say S = {v1, ..., vn}. We write the span of S as span(S) or sp(S): span(𝐯1,…,𝐯n):={a1𝐯1+⋯+an𝐯n:a1,…,an∈K}.
Linear independence
… excerpt ends here. Continue reading the full article.

