Objective. Define linear combination and which vector operations it may include.
The figure scales bu1=(21) by 2 and bu2=(−12) by 1, then adds the two scaled vectors tip to tail. The orange arrow from the origin to (3,4) is
2bu1+1bu2=(42)+(−12)=(34),
a linear combination of bu1 and bu2.
Definition 1 (Linear combination).
If bu1,bu2,…,bun are vectors and x1,x2,…,xn are scalars, then x1bu1+x2bu2+⋯+xnbun is a linear combination of bu1,bu2,…,bun.
The expression 2bu+3 is not a linear combination, because its term 3 is a scalar with no vector. The definition adds only scalar multiples of vectors.
Allowed operations. A linear combination is built from scalar multiplication and vector addition. Vector subtraction is allowed, because bu−bv=bu+(−1)bv is an addition with a scalar of −1.
Excluded operations. An expression that divides by a vector is not a linear combination, because division by a vector is undefined. The dot product bu⋅bv, defined on the Lesson 20 sheet, multiplies two vectors to give a scalar. A linear combination of vectors is always a vector, and a scalar such as bu⋅bv on its own is therefore not one.
Matching dimensions. Every vector in a linear combination has the same dimension.
Special cases. A single scaled vector such as −6bw is a linear combination with n=1. A plain sum such as bu+bv is a linear combination with both scalars equal to 1.
Example 1
For the vectors
bp=2−10,bq=135,br=(4−2),bs=(01),
determine which of these expressions are linear combinations, where x and y are scalars:
By the definition of a linear combination, the expression 5bp is a linear combination, because it is one vector scaled by 5, the case n=1.
The expression 2bp−br is not a linear combination, because bp has dimension 3 and br has dimension 2.
The expression xbr+ybs is a linear combination with unknown scalars.
The expression bp⋅bq is not a linear combination, because it is a single scalar (the Lesson 20 dot product).
The expression br/bs is not a linear combination, because division by a vector is undefined.
The expression xbp+ybq−4bp is a linear combination, because it collects to (x−4)bp+ybq.
Example 2
Each B-1B sortie carries the load bb=(816) and each B-52H sortie carries the load bh=(128), with the count of Joint Air-to-Surface Standoff Missiles (JASSM) first and the count of Guided Bomb Unit-31 (GBU-31) bombs second. Decide whether each quantity is a linear combination of bb and bh, and name the scalars of each one that is.
(a) The total load of three B-1B sorties and two B-52H sorties.
(b) The load of one B-52H sortie minus the load of one B-1B sortie.
(c) The number of JASSM per GBU-31 on one B-1B sortie.
ShowHide solution
(a) The total load is 3bb+2bh, a linear combination with scalars 3 and 2.
(b) The difference is bh−bb=(−1)bb+1bh, a linear combination with scalars −1 and 1, because subtraction is addition with a scalar of −1.
(c) The ratio 8/16=0.5 divides one component by another and gives a single scalar. It is not a linear combination, because a linear combination of vectors is a vector.
The first result matches the hand computation of Example 3, because R pairs the components by position.
Example 5
Each B-1B sortie carries the load bb=(816) and each B-52H sortie carries bh=(128), JASSM first and GBU-31 second. Compute the total load 3bb+2bh of three B-1B sorties and two B-52H sorties by hand and in R.
ShowHide solution
Multiply each component of bb by 3 and each component of bh by 2, then add the matching components:
3bb+2bh=3(816)+2(128)=(2448)+(2416)=(4864).
In R, the line 3 * b + 2 * h does the same two steps. Used R.
Objective. Rewrite a system of equations as an equivalent vector equation (and vice-versa).
Definition 2 (Vector equation).
A vector equation is an equality between linear combinations of vectors.
The equation xbu+ybv=7 is not a vector equation, because its right side 7 is a scalar. The definition requires a linear combination of vectors on each side.
Each equation of a system of linear equations is one component of the equivalent vector equation.
Write every equation with the unknowns in the same order on the left and the constant on the right. An unknown missing from an equation has coefficient 0.
Write the coefficients of each unknown top to bottom as one vector multiplied by that unknown.
Write the right-hand sides top to bottom as one vector.
Set the sum of the scaled vectors equal to that vector.
To rewrite a vector equation as a system, take the components one row at a time.
For the first row, multiply the first component of each scaled vector by its unknown, and add the products on the left side of the first equation.
Put the first component of the vector on the other side on the right side of the first equation.
Repeat for each later row, one equation per row.
Example 6
Each B-1B sortie carries 8 JASSM and 16 GBU-31 bombs. Each B-52H sortie carries 12 JASSM and 8 GBU-31. A strike takes 28 JASSM and 40 GBU-31. With x B-1B sorties and y B-52H sorties, write the tasking as a system of equations, then as a vector equation.
ShowHide solution
Count each munition over both bomber types, one equation per munition:
8x+12y16x+8y=28,=40.(JASSM)(GBU-31)
Each sortie’s load is one vector, with the JASSM count first. The first equation becomes the first component and the second equation the second component:
x(816)+y(128)=(2840).
By the definition of a vector equation, this is one: each side is a linear combination of vectors, the right side with the single scalar 1. The method of section 4 gives the solution x=2 and y=1. Substituting these scalars shows that two B-1B sorties and one B-52H sortie fill the tasking:
2(816)+1(128)=(1632)+(128)=(2840).
Example 7
Rewrite the system as a vector equation:
−x+4y+z6x−5y+7zx+z=3,=0,=8.
ShowHide solution
Write the coefficients of each unknown, top to bottom, as the vector that unknown multiplies. The third equation has no y, and the third component of the vector multiplied by y is 0:
x−161+y4−50+z171=308.
Example 8
Rewrite the vector equation as a system of equations:
x130+y4−81+z50−1=2−613.
ShowHide solution
Take the components one row at a time, one equation per row. An unknown whose component is 0 is left out of that row’s equation:
x+4y+5z3x−8yy−z=2,=−6,=13.
The sum of the scaled vectors may sit on either side: the equations bw=xbu+ybv and xbu+ybv=bw are the same equation.
Objective. Given a vector equation, solve for the scalars of the linear combination by hand.
Two vectors of the same dimension are equal when their matching components are equal (MMAC p. 284). A vector equation is therefore true exactly when the equation for each of its components is true.
The pair x=a and y=b is a solution of the vector equationbw=xbu+ybv when bw is equal to abu+bbv.
Write one equation per component.
Solve the two equations. To substitute, solve one equation for one unknown and put the result into the other. To eliminate, multiply one or both equations by numbers so that one unknown has the same coefficient up to sign, then add or subtract the equations so that the unknown drops out.
Check the scalars by computing the linear combination with them.
Example 9
Solve for a and b:
(51)=a(20)+b(−11).
ShowHide solution
Write one equation per component:
5=2a−b,1=b.
Substitute b=1 from the second equation into the first, and solve for a:
5=2a−1,6=2a,a=3.
As a check, the linear combination with a=3 and b=1 returns the right side:
3(20)+1(−11)=(60)+(−11)=(51).
Example 10
MMAC 3.2 Example 3: solve for x and y:
(710)=x(2−1)+y(14).
ShowHide solution
Write one equation per component:
2x+y=7,−x+4y=10.
Solve the first equation for y, which gives y=7−2x, and substitute it into the second:
−x+4(7−2x)=−9x+28=10,−9x=−18,x=2.
Substitute x=2 into y=7−2x:
y=7−2(2)=3.
As a check, the linear combination with x=2 and y=3 returns the right side:
2(2−1)+3(14)=(4−2)+(312)=(710).
Example 11
Solve for a and b:
a(0−3)+b(53)=(10−5).
ShowHide solution
Write one equation per component:
5b=10,−3a+3b=−5.
The first equation has only b, and gives b=2. Substitute b=2 into the second and solve for a:
−3a+3(2)=−5,−3a=−11,a=311≈3.667.
To check the scalars in R, compute the linear combination with the exact fraction and with the rounded value:
u = c(0, -3)v = c(5, 3)(11/3) * u + 2 * v[1] 10 -53.667 * u + 2 * v[1] 10.000 -5.001
The exact fraction returns the right side, and the rounded scalar misses the second component by 0.001.
Example 12
Solve for x and y:
x(32)+y(4−5)=(103).
ShowHide solution
Write one equation per component:
3x+4y=10,2x−5y=3.
Elimination is shorter than substitution here, because no coefficient is 1, −1, or 0. Add 5 times the first equation to 4 times the second to eliminate y. The multipliers 5 and 4 make the y terms 20y and −20y, which cancel:
By the definition of size, rows come first. Matrix A has 2 rows and 2 columns. It is 2×2, with columns (16) and (40).
Matrix B is 3×2, with columns (432) and (632).
Matrix C is 2×3, with columns (13), (05), and (−24).
The vector bv is 3×1.
Matrices B and C each contain six numbers but have different sizes, because B is 3×2 and C is 2×3.
Example 14
A squadron log records the sorties flown by each of three squadrons on each of the five days of a week, one row per day and one column per squadron. Give the size of the log as a matrix, and the dimension of each of its columns.
ShowHide solution
The log is a 5×3 matrix, because it has one row per day and one column per squadron. Each column lists one squadron’s sorties over the five days, a vector of dimension 5.
Objective. Compute the product of a vector and a matrix, or determine the product is undefined.
Definition 5 (Matrix-vector product).
For a matrix A with columns bu1,bu2,…,bun and a vector bx with components x1,x2,…,xn, the matrix-vector product is
Abx=x1bu1+x2bu2+⋯+xnbun.
The product (1735)(123) is undefined, because the definition pairs each column of the matrix with one component of the vector, and the matrix has two columns for three components.
The product Abx, with the matrix written first, has one component per row of A.
Count the columns of A and the components of bx. Unequal counts mean the product is undefined.
Scale each column of A by the matching component of bx.
Add the scaled columns.
Example 15
Compute the product:
(1735)(23).
ShowHide solution
The product is defined, because the matrix has two columns and the vector has two components. Scale each column by the matching component of the vector and add, by the definition of the matrix-vector product:
In the figure, the blue arrow is the first column scaled by 2. The green dashed arrow is the second column scaled by 3, drawn tip to tail. The orange arrow from the origin to (11,29) is the product.
Example 16
Compute the product:
4−16120035−213.
ShowHide solution
The product is defined, because the matrix has three columns and the vector has three components. Scale each column and add, as in Example 15:
The product is defined, because the 3×2 matrix has two columns and the vector has two components. Scale each column and add; the product has 3 components, one per row:
1143+26−54=143+12−108=13−611.
Example 18
For
B=432632,C=(1305−24),
determine whether each product is defined, and compute the one that is:
B(123),C(123).
ShowHide solution
The product B(123) is undefined, because B has 2 columns and the vector has 3 components. The product C(123) is defined, because C has 3 columns. Scale each column of C and add:
A matrix equationAbx=bw is a vector equation with its vectors as the columns of A and its scalars as the components of bx.
Example 19
Rewrite as a vector equation:
(20−11)(ab)=(51).
ShowHide solution
The columns of the matrix become the vectors, and the unknowns become the scalars:
a(20)+b(−11)=(51).
Example 20
Write the bomber vector equation of Example 6 as a matrix equation, and give the size of its matrix:
x(816)+y(128)=(2840).
ShowHide solution
The columns of the matrix are the two sortie loads, in the order of their scalars x and y:
(816128)(xy)=(2840).
The matrix is 2×2, because it has one row per munition and one column per bomber type. With the loads written as rows, the product (812168)(xy) is x(812)+y(168), a different linear combination from the tasking’s x(816)+y(128).