Linear Algebra and Its Applications, exercise 1.3.6

Exercise 1.3.6. Given the following system of equations:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcr}au&+&v&=&1 \\ 4u&+&av&=&2 \end{array}

for what values of a would Gaussian elimination break down, either in a fixable way (i.e., via row exchange) or in a non-fixable way?

Answer: One way for elimination to break down temporarily would be for the coefficient of u in the first equation to be 0, thereby forcing a row exchange as the very first step in elimination. This corresponds to the case a = 0 and the following set of equations:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcr}&&v&=&1 \\ 4u&&&=&2 \end{array}

A second way for elimination to fail would be for one equation to be equal to the other equation times some constant c. This would correspond to the equations representing the same line in the u-v plane, with no unique solution (singular system). We now try to find a value of a for which this situation would occur.

Note that we can multiply the right-hand side of the first equation by 2 to get the right hand side of the second equation. Multiplying the left-hand side of the first equation by 2 and setting it equal to the left-hand side of the second equation gives us:

2(au + v) = 4u + av \quad\rightarrow\quad 2au + 2v = 4u + av \quad\rightarrow\quad a = 2

So if a = 2 then we have the following set of equations:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcr}2u&+&v&=&1 \\ 4u&+&2v&=&2 \end{array}

which after elimination produces the single equation

\setlength\arraycolsep{0.2em}\begin{array}{rcrcr}2u&+&v&=&1\end{array}

for which no unique solution exists.

Another approach is to assume that a \ne 0 and to perform elimination. In order to eliminate the first term of the second equation we multiply the first equation by 4/a and subtract it from the second. This gives us

4u+av - 4/a(au+v) = 2 - (4/a)\cdot 1

\rightarrow 4u - 4u + av - (4/a)v = 2 - 4/a

\rightarrow (a - 4/a)v = 2 - 4/a

Elimination can fail at this point if the term involving v is zero, which would be the case if a - 4/a = 0. Multiplying this equation by a on both sides gives us a^2 - 4 = 0 or a^2 = 4 with solutions a = 2 and a = -2.

We’ve already considered the case a = 2. When a = -2 the original equations become

\setlength\arraycolsep{0.2em}\begin{array}{rcrcr}-2u&+&v&=&1 \\ 4u&-&2v&=&2 \end{array}

which after elimination becomes

\setlength\arraycolsep{0.2em}\begin{array}{rcrcr}-2u&+&v&=&1 \\ &&0&=&4 \end{array}

This system has no solution.

To sum up, there are three values of a for which elimination could temporarily or permanently break down:

  • When a = 0 elimination temporarily breaks down and requires a row exchange.
  • When a = 2 elimination permanently breaks down and the system has an infinite number of solutions.
  • When a = -2 elimination permanently breaks down and the system has no solution.

UPDATE: Tried to clarify the explanation of the second way in which elimination could break down, and included a third way elimination could fail based on comments from coruja38.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | 5 Comments

Linear Algebra and Its Applications, exercise 1.3.5

Exercise 1.3.5. Given the following system of equations:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcr}x&-&y&=&0    \\ 3x&+&6y&=&18 \end{array}

find a solution to the system. (The exercise also calls for doing a sketch of the lines corresponding to the equations, as well as the line corresponding to the second equation after elimination. I’m skipping that part.)

Answer: We subtract 3 times the first equation from the second equation:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcr}x&-&y&=&0     \\ 3x&+&6y&=&18 \end{array} \Rightarrow \begin{array}{rcrcr}x&-&y&=&0     \\ &&9y&=&18 \end{array}

We can then back-substitute to solve for y and then x:

\begin{array}{rcrcr}9y = 18&\Rightarrow&y = 2 \\x - y  = 0&\Rightarrow&x = 2 \end{array}

So the solution is x = 2, y = 2.

The first equation corresponds to the line y = x at a 45 degree angle to the x axis and intersecting the origin. The second equation corresponds to the line y = -\frac{1}{2}x + 3 with slope -\frac{1}{2} and intersecting the y axis at the point (0, 3). After elimination the second equation 9y = 18 (or y = 2) corresponds to a horizontal line intersecting the y axis at the point (0, 2).

UPDATE: Corrected the y-intercept for the second equation; thanks go to pana8a7 for finding and fixing this error. Also corrected a type in the elimination steps (had 19 instead of 18). Finally, took the time to convert all variable names and in-line equations to use LaTeX.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | 2 Comments

Linear Algebra and Its Applications, exercise 1.3.4

Exercise 1.3.4. Given the following system of equations:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcrcr}u&+&v&+&w&=&-2   \\ 3u&+&3v&-&w&=&6 \\ u&-&v&+&w&=&-1 \end{array}

find a solution to the system, exchanging rows when necessary due to a zero pivot. Also, specify a coefficient for v in the third equation that would prevent elimination from being successful.

Answer: We can represent the system as the following matrix:

\left[ \begin{array}{rrrrr} 1&1&1&-2 \\ 3&3&-1&6 \\ 1&-1&1&-1 \end{array} \right]

The first pivot is 1. The first step in elimination is to subtract three times the first equation from the second, and the first equation from the third. This gives the following matrix:

\left[ \begin{array}{rrrrr} 1&1&1&-2 \\ 0&0&-4&12 \\ 0&-2&0&1 \end{array} \right]

Since we have a zero in the pivot position we exchange the second and third rows:

\left[ \begin{array}{rrrrr} 1&1&1&-2 \\ 0&-2&0&1 \\  0&0&-4&12 \end{array} \right]

Now that the system is in trangular form we re-express it using u, v, and w:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcrcrcr}u&+&v&+&w&=&-2    \\ &&-2v&&&=&1 \\   &&&&-4w&=&12 \end{array}

and then back-substitute, starting with solving for w:

\begin{array}{rcrcr}-4w = 12&\Rightarrow&w = -3 \\ -2v = 1&\Rightarrow&v = -\frac{1}{2} \\ u +  v + w = -2&\Rightarrow&u = -2 + \frac{1}{2} +3&\Rightarrow&u = \frac{3}{2}\end{array}

So the solution is u = 3/2, v = -1/2, w = 3 w = -3.

Note that when we exchanged rows the coefficient of v in the third row was -2; if it had been 0 at that point then we would not have been able to exchange rows. The coefficient of -2 was produced by subtracting v in the original first equation from -v in the original second equation. If instead of -v we had v in the original third equation then we would be subtracting v from v to get 0. So elimination would have been impossible if the coefficient of v in the third equation had been 1.

UPDATE: Corrected the statement of the solution for w in the second to last paragraph of the answer. Thanks to freaky4you for the fix!

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | 2 Comments

Linear Algebra and Its Applications, exercise 1.3.3

Exercise 1.3.3. Given the following system of equations:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcrcrcl}2u&-&v&&&&&=&0  \\ -u&+&2v&-&w&&&=&0 \\ &&-v&+&2w&-&z&=&0 \\ &&&&-w&+&2z&=&5 \end{array}

find a solution to the system, and give the pivots. You can use a matrix to represent the system (including the right-hand side).

Answer: We can represent the system as the following matrix:

\left[ \begin{array}{rrrrr} 2&-1&0&0&0 \\ -1&2&-1&0&0 \\ 0&-1&2&-1&0 \\ 0&0&-1&2&5 \end{array} \right]

The first pivot is 2. The first step in elimination gives the following matrix:

\left[ \begin{array}{rrrrr} 2&-1&0&0&0 \\ 0&\frac{3}{2}&-1&0&0 \\ 0&-1&2&-1&0 \\  0&0&-1&2&5 \end{array} \right]

The second pivot is 3/2. The second step in elimination gives the following:

\left[ \begin{array}{rrrrr} 2&-1&0&0&0 \\  0&\frac{3}{2}&-1&0&0 \\ 0&0&\frac{4}{3}&-1&0 \\   0&0&-1&2&5 \end{array} \right]

The third pivot is 4/3. The third step in elimination gives the following:

\left[ \begin{array}{rrrrr}  2&-1&0&0&0 \\  0&\frac{3}{2}&-1&0&0 \\  0&0&\frac{4}{3}&-1&0 \\   0&0&0&\frac{5}{4}&5  \end{array} \right]

Now that the system is in trangular form we re-express it using u, v, w, and z:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcrcrcl}2u&-&v&&&&&=&0   \\ &&\frac{3}{2}v&-&w&&&=&0 \\  &&&&\frac{4}{3}w&-&z&=&0 \\  &&&&&&\frac{5}{4}z&=&5 \end{array}

and then back-substitute, starting with solving for z:

\begin{array}{rcrcr}\frac{5}{4}z = 5&\Rightarrow&z = 4&& \\  \frac{4}{3}w - z = 0&\Rightarrow&\frac{4}{3}w = 4&\Rightarrow&w = 3 \\ \frac{3}{2}v - w = 0&\Rightarrow&\frac{3}{2}v = 3&\Rightarrow&v = 2 \\ 2u  - v = 0&\Rightarrow&2u = 2&\Rightarrow&u =  1\end{array}

So the solution is u = 1, v = 2, w = 3, z = 4.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | Leave a comment

Linear Algebra and Its Applications, exercise 1.3.2

Exercise 1.3.2. Perform Gaussian elimination on the following system of equations:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcrcl}u&+&v&+&w&=&2 \\ u&+&3v&+&3w&=&0 \\ u&+&3v&+&5w&=&2 \end{array}

and find the resulting triangular system and the solution.

Answer: The first pivot is 1. We subtract the first equation from the second and the third:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcrcl}u&+&v&+&w&=&2  \\ u&+&3v&+&3w&=&0 \\  u&+&3v&+&5w&=&2 \end{array} \Rightarrow \begin{array}{rcrcrcl}u&+&v&+&w&=&2  \\ &&2v&+&2w&=&-2 \\ &&2v&+&4w&=&0 \end{array}

The second pivot is 2. We substract the second equation from the third, giving us the final triangular system:

\setlength\arraycolsep{0.2em}\begin{array}{rcrcrcl}u&+&v&+&w&=&2  \\  &&2v&+&2w&=&-2 \\  &&2v&+&4w&=&0 \end{array} \Rightarrow \begin{array}{rcrcrcl}u&+&v&+&w&=&2  \\  &&2v&+&2w&=&-2 \\  &&&&2w&=&2 \end{array}

We can then back-substitute, starting with solving for w:

\begin{array}{l}2w = 2 \Rightarrow w = 1 \\ 2v + 2w = -2 \Rightarrow 2v + 2 = -2 \Rightarrow v = -2 \\ u + v + w = 2 \Rightarrow u -2 + 1 = 2 \Rightarrow u = 3\end{array}

So the solution is u = 3, v = -2, w = 0 w = 1.

UPDATE: Corrected statement of solution for w in last paragraph; thanks to freaky4you for the fix!

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | 2 Comments

Linear Algebra and Its Applications, exercise 1.3.1

Exercise 1.3.1. Solve the following equation using Gaussian elimination:

\setlength\arraycolsep{0.2em}\begin{array}{rrrrrrr}2u&-&3v&&&=&3 \\ 4u&-&5v&+&w&=&7 \\ 2u&-&v&-&3w&=&5 \end{array}

Answer: The first pivot is 2 (the coefficient of u in the first equation). We multiply the first equation by 2 (the coefficient of u in the second equation divided by the pivot) and subtract it from the second. We also multiply the first equation by 1 (the coefficient of u in the third equation divided by the pivot) and subtract it from the third:

\setlength\arraycolsep{0.2em}\begin{array}{rrrrrrr}2u&-&3v&&&=&3 \\  4u&-&5v&+&w&=&7 \\  2u&-&v&-&3w&=&5 \end{array} \Rightarrow \begin{array}{rrrrrrr}2u&-&3v&&&=&3 \\ &&v&+&w&=&1 \\ &&2v&-&3w&=&2 \end{array}

The second pivot is 1 (the coefficient of v in the second equation). We multiply the second equation by 2 (the coefficient of v in the third equation divided by the pivot) and subtract it from the third:

\setlength\arraycolsep{0.2em}\begin{array}{rrrrrrr}2u&-&3v&&&=&3 \\   &&v&+&w&=&1 \\   &&2v&-&3w&=&2 \end{array} \Rightarrow  \begin{array}{rrrrrrr}2u&-&3v&&&=&3 \\  &&v&+&w&=&1 \\  &&&&-5w&=&0 \end{array}

We can then back-substitute, starting with solving for w:

-5w = 0 \Rightarrow w = 0, v + w = 1 \Rightarrow v = 1, 2u - 3v = 3 \Rightarrow u = 3

So the solution is u = 3, v = 1, w = 0.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | Leave a comment

Linear Algebra and Its Applications, exercise 1.2.13

Exercise 1.2.13. Given the equation x + 4y = 7 for a line in the x-y plane, find the equation for a line that is parallel to the first line and passes through the point (0, 0). The first line passes through the point (1, 3) (3, 1); find another line that also passes through that point.

Answer: Solving for y in the first equation, we have

x + 4y = 7 \Rightarrow 4y = -x + 7 \Rightarrow y = - \frac{1}{4}x + \frac{7}{4}

This line has slope 1/4 and intersects the y axis at the point (0, 7/4). The parallel line (also of slope 1/4) passing through the origin has the equation y  = - \frac{1}{4}x.

If we assume a slope of 1 then the corresponding line has an equation of the form y = x + a for some a. If we further assume that the line goes through the point (1, 3) (3, 1) then a = 2 a = -2. So the line with equation y = x + 2 y = x – 2 satisfies the condition for the second part of the exercise.

UPDATE: Corrected the point of intersection. (I had transcribed the exercise incorrectly.) Thanks to freaky4you for the fix!

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | 2 Comments

Linear Algebra and Its Applications, exercise 1.2.12

Exercise 1.2.12. We have two equations, x + y + z = 1 and x + y + z = 2. The first part of the exercise is to sketch the planes in 3-space associated with these two equations; I’m skipping that part. The second part of the exercise is to find a vector that is perpendicular to both of those planes.

Answer: The plane for the equation x + y + z = 1 intersects the x, y, and z axes in the points (1, 0, 0), (0, 1, 0), and (0, 0, 1) respectively; the lines between those three points are in the plane in question. Any vector perpendicular to the plane is therefore going to be perpendicular to each of those three lines.

The line passing through the points (1, 0, 0) and (0, 1, 0) is in the x-y plane and is described by the equation y = -x + 1. One line perpendicular to that line is the z axis, for which x = y = 0. Another line perpendicular to that line is the line y = x in the x-y plane, for which z = 0. These two lines form a plane, and all lines in that plane are also perpendicular to the line between (1, 0, 0) and (0, 1, 0). We also have x = y for all points in the plane. Or to put it another way, the plane is described by the equation x – y = 0.

Similarly, the line passing through the points (0, 1, 0) and (0, 0, 1) is in the y-z plane and is described by the equation z = -y + 1. All lines perpendicular to that line are in the plane for which y = z (or y – z = 0).

Finally, the line passing through the points (1, 0, 0) and (0, 0, 1) is in the x-z plane and is described by the equation z = -x + 1. All lines perpendicular to that line are in the plane for which z = x (or x – z = 0).

For a vector to be perpendicular to the original plane associated with the equation x + y + z = 1, it must be in each of the three planes just described. The intersection of those planes is the line for which x = y = z. So (1, 1, 1) is a vector perpendicular to the original plane.

A similar argument shows that the vector (1, 1, 1) is perpendicular to the plane for which x + y + z = 2.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | Leave a comment

Linear Algebra and Its Applications, exercise 1.2.11

Exercise 1.2.11. Assume that we have the following system of two equations in two unknowns:

\setlength\arraycolsep{0.2em}\begin{array}{rcl}ax + 2y&=&0 \\ 2x + ay&=&0\end{array}

Under what circumstances would this system have a set of solutions constituting an entire line in the x-y plane?

Answer: Each of the equations corresponds to a line in the x-y plane. There are thus three possibilities:

  1. The lines intersect in a point. The point corresponds to a unique solution to the system of equations.
  2. The lines are parallel and do not intersect. There is no solution to the system of equations.
  3. The lines are identical, i.e., they form a single line. The set of solutions consists of all points on the line.

For this exercise we want case (3), i.e., the lines are identical. In order for the lines to be identical the two equations need to be identical or one needs to be equal to the other times some constant. In this case the equations can be made identical simply by setting a = 2. The resulting line is then described by the equation 2x + 2y = 0, or y = -x.

Another solution is found by setting a = -2. In that case the second equation is equal to -1 times the first. The resulting line is then described by the equation 2x – 2y = 0, or y = x.

UPDATE: Added the solution a = -2. Thanks to coruja38 for pointing this out.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | 4 Comments

Linear Algebra and Its Applications, exercise 1.2.10

Exercise 1.2.10. Assume we have the points (0, y_1), (1, y_2), and (2, y_3). What values must y_1, y_2, and y_3 have in order for these points to fall on a straight line?

Answer: If the points fall on the same line then we must have the slope \Delta y / \Delta x be the same between the first two points as it is between the second two points. We therefore have

(y_2 - y_1) / (1 - 0) = (y_3 - y_2) / (2 - 1) \Rightarrow y_2 - y_1 = y_3 - y_2

UPDATE: Corrected the formula for the slope; thanks to coruja38 for the fix!

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.

Posted in linear algebra | 2 Comments