Linear Algebra and Its Applications, Exercise 2.2.9

Exercise 2.2.9. Consider the following A and b:

A = \begin{bmatrix} 1&2&0&3 \\ 2&4&0&7 \end{bmatrix} \qquad b = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}

For what values of b_1 and b_2 does the system Ax = b have a solution? Also, determine the nullspace of A and provide two examples of vectors within it, and find the general solution to Ax = b.

Answer: We perform elimination by subtracting 2 times the first row from the third row:

\begin{bmatrix} 1&2&0&3 \\ 2&4&0&7 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix} \Rightarrow \begin{bmatrix} 1&2&0&3 \\ 0&0&0&1 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 - 2b_1 \end{bmatrix}

This completes elimination and produces the system Ux = c:

\begin{bmatrix} 1&2&0&3 \\ 0&0&0&1 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 - 2b_1 \end{bmatrix}

Since the pivots of U are in columns 1 and 4, the basic variables are u and y and the free variables are v and w. There are no constraints on the values of b_1 and b_2.

To find the general solution to Ax = b we start with the system Ax = 0, which is equivalent to Ux = 0:

\begin{bmatrix} 1&2&0&3 \\ 0&0&0&1 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}

From the second equation we must have y = 0. Substituting the value of y into the first equation we have u + 2v = 0 or u = -2v. The general solution to Ax = 0 can then be expressed in terms of the free variables v and w as follows:

x_{homogeneous} = v \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix} + w \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix}

By setting v = 1 and w = 0 we obtain one vector (-2, 1, 0, 0) in the nullspace of A and by setting v = 0 and w = 1 we obtain another vector (0, 0, 1, 0) also in the nullspace.

We can obtain a particular solution to Ax = b by going back to the system Ux = c derived above:

\begin{bmatrix} 1&2&0&3 \\ 0&0&0&1 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 - 2b_1 \end{bmatrix}

From the second equation we have y = b_2 - 2b_1. Substituting for y into the first equation we have u + 2v + 3(b_2 - 2b_1) = u + 2v +3b_2 - 6b_1 = b_1 or u = -2v + 7b_1 - 3b_2. Setting the free variables v and w to zero gives the particular solution

x_{particular} = \begin{bmatrix} 7b_1 - 3b_2 \\ 0 \\ 0 \\ -2b_1 + b_2 \end{bmatrix}

The general solution to Ax = b is then

x = x_{particular} + x_{homogeneous} = \begin{bmatrix} 7b_1 - 3b_2 \\ 0 \\ 0 \\ -2b_1 + b_2 \end{bmatrix} + v \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix} + w \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix}

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 2.2.8

Exercise 2.2.8. Consider the following system of linear equations:

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

For what value of c does this system have a solution?

Answer: We use elimination to attempt to solve the system, starting by multiplying the first equation by 2 and subtracting it from the second, and multiplying the first equation by 3 and subtracting it from the third:

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

and then substract 1 times the second equation from the third:

\begin{array}{rcrcrcl}u&+&v&+&2w&=&2 \\ &&v&-&5w&=&1 \\ &&v&-&5w&=&c-6 \end{array} \Rightarrow \begin{array}{rcrcrcl}u&+&v&+&2w&=&2 \\ &&v&-&5w&=&1 \\ &&&&0&=&c-7 \end{array}

In order for this system to have a solution we must have c - 7 = 0 or c = 7.

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 2.2.7

Exercise 2.2.7. Consider the following system of linear equations:

\begin{bmatrix} 1&0 \\ 0&1 \\ 2&3 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix}

Find the values of b for which the system has a solution. What is the rank? How many basic variables and free variables are there?

Answer: We perform elimination by first subtracting 2 times the first row from the third row:

\begin{bmatrix} 1&0 \\ 0&1 \\ 2&3 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \end{bmatrix} \Rightarrow \begin{bmatrix} 1&0 \\ 0&1 \\ 0&3 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 - 2b_1 \end{bmatrix}

and then subtracting 3 times the second row from the third:

\begin{bmatrix} 1&0 \\ 0&1 \\ 0&3 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 - 2b_1 \end{bmatrix} \Rightarrow \begin{bmatrix} 1&0 \\ 0&1 \\ 0&0 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 - 2b_1 -3b_2 \end{bmatrix}

This completes elimination and produces the system Ux = c.

From the third equation we must have b_3 -2b_1 -3b_2 = 0 in order for the system to have a solution. The matrix U has pivots in columns 1 and 2, so that the basic variables are u and v; there are no free variables. The rank is 2 (the number of basic variables).

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 2.2.6

Exercise 2.2.6. Consider the following system of linear equations:

\begin{bmatrix} 1&2&2 \\ 2&4&5 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \end{bmatrix} = \begin{bmatrix} 1 \\ 4 \end{bmatrix}

Find the general solution expressed as the sum of a particular solution to Ax = b and the solution to Ax = 0.

Answer: We perform elimination by subtracting 2 times the first row from the second row:

\begin{bmatrix} 1&2&2 \\ 2&4&5 \end{bmatrix} \Rightarrow \begin{bmatrix} 1&2&2 \\ 0&0&1 \end{bmatrix}

This completes elimination. The matrix U has pivots in columns 1 and 3, so that the basic variables are u and w and the free variable is v.

We can replace the system Ax = 0 with the new system Ux = 0:

\begin{bmatrix} 1&2&2 \\ 0&0&1 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}

From the second equation we have w = 0. Substituting into the first equation gives us u +2v + 2w = u + 2v = 0 or u = -2v. The general solution to Ax = 0 is thus

x = \begin{bmatrix} -2v \\ v \\ 0 \end{bmatrix} = v \begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}

We now consider the inhomogeneous system Ax = b or

\begin{bmatrix} 1&2&2 \\ 2&4&5 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \end{bmatrix} = \begin{bmatrix} 1 \\ 4 \end{bmatrix}

The elimination sequence from above produces the system Ux = c or

\begin{bmatrix} 1&2&2 \\ 0&0&1 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \end{bmatrix}

From the second equation we have w = 2. Substituting into the first equation and setting the free variable v = 0 produces u + 2v + 2w = u + 0 + 4 = 1 or u = -3. The particular solution is thus x = (-3, 0, 2).

We can combine the particular solution to this system with the general solution to Ax = 0 to produce the general solution x for the system Ax = b:

x = \begin{bmatrix} -3 \\ 0 \\ 2 \end{bmatrix} + v \begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}

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 2.2.5

Exercise 2.2.5. Consider the system of linear equations represented by the following matrix:

A = \begin{bmatrix} 0&0 \\ 1&2 \\ 4&8 \\ 0&0 \end{bmatrix}

(This is the transpose of the matrix from exercise 2.2.4.) Find the echelon matrix U, a set of basic variables, a set of free variables, and the general solution to Ax = 0. Then use elimination to find when the system Ax = b has a solution, and express that solution as the sum of a particular solution and the general solution to Ax = 0. Finally, find the rank of A.

Answer: We must do a row exchange to exchange the first and second rows. This is equivalent to multiplying by a permutation matrix P as follows:

PA = \begin{bmatrix} 0&1&0&0 \\ 1&0&0&0 \\ 0&0&1&0 \\ 0&0&0&1 \end{bmatrix} \begin{bmatrix} 0&0 \\ 1&2 \\ 4&8 \\ 0&0 \end{bmatrix} = \begin{bmatrix} 1&2 \\ 0&0 \\ 4&8 \\ 0&0 \end{bmatrix}

We then perform elimination on PA by subtracting 4 times the first row from the third row (i.e., using the multiplier l_{31} = 4):

\begin{bmatrix} 1&2 \\ 0&0 \\ 4&8 \\ 0&0 \end{bmatrix} \Rightarrow \begin{bmatrix} 1&2 \\ 0&0 \\ 0&0 \\ 0&0 \end{bmatrix}

This completes elimination, and leaves us with the echelon matrix

U = \begin{bmatrix} 1&2 \\ 0&0 \\ 0&0 \\ 0&0 \end{bmatrix}

and the factorization PA = LU:

\begin{bmatrix} 0&1&0&0 \\ 1&0&0&0 \\ 0&0&1&0 \\ 0&0&0&1 \end{bmatrix} \begin{bmatrix} 0&0 \\ 1&2 \\ 4&8 \\ 0&0 \end{bmatrix} = \begin{bmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 4&0&1&0 \\ 0&0&0&1 \end{bmatrix} \begin{bmatrix} 1&2 \\ 0&0 \\ 0&0 \\ 0&0 \end{bmatrix}

We now solve for

Ax = \begin{bmatrix} 0&0 \\ 1&2 \\ 4&8 \\ 0&0 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = 0

which is equivalent to

Ux = \begin{bmatrix} 1&2 \\ 0&0 \\ 0&0 \\ 0&0 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = 0

The pivot in U is in column 1, so the (only) basic variable is u and the free variable is v.

From the first row of U we have u + 2v = 0 and thus u = -2v. We then have

x = \begin{bmatrix} -2v \\ v \end{bmatrix} = v \begin{bmatrix} -2 \\ 1 \end{bmatrix}

In considering the inhomogeneous system Ax = b or

\begin{bmatrix} 0&0 \\ 1&2 \\ 4&8 \\ 0&0 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ b_4 \end{bmatrix}

the elimination sequence above (including the initial row exchange) would produce the system Ux = c or

\begin{bmatrix} 1&2 \\ 0&0 \\ 0&0 \\ 0&0 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} b_2 \\ b_1 \\ b_3 - 4b_2 \\ b_4 \end{bmatrix} \Rightarrow \begin{bmatrix} u+2v \\ 0 \\ 0 \\ 0 \end{bmatrix} = \begin{bmatrix} b_2 \\ b_1 \\ b_3 - 4b_2 \\ b_4 \end{bmatrix}

From the second and fourth equations we must have b_1 = b_4 = 0.  From the third equation we must have b_3 - 4b_2 = 0 or b_3 = 4b_2. Thus for Ax = b to have a solution the vector b must have the form (0, b_2, 4b_2, 0).

Taking b = (0, b_2, 4b_2, 0) produces the system

\begin{bmatrix} 0&0 \\ 1&2 \\ 4&8 \\ 0&0 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} 0 \\ b_2 \\ 4b_2 \\ 0 \end{bmatrix}

which after row exchange and elimination becomes

\begin{bmatrix} 1&2 \\ 0&0 \\ 0&0 \\ 0&0 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} b_2 \\ 0 \\ 0 \\ 0 \end{bmatrix}

The first equation gives u + 2v = b_2 or u = b_2 - 2v. Setting the free variable v to zero produces the particular solution x = (u, v) = (b_2, 0) to the system

\begin{bmatrix} 0&0 \\ 1&2 \\ 4&8 \\ 0&0 \end{bmatrix} \begin{bmatrix} u \\ v \end{bmatrix} = \begin{bmatrix} 0 \\ b_2 \\ 4b_2 \\ 0 \end{bmatrix}

We can combine the particular solution to this system with the solution to Ax = 0 to produce the general solution x for the system Ax = b

x = \begin{bmatrix} b_2 \\ 0 \end{bmatrix} + v \begin{bmatrix} -2 \\ 1 \end{bmatrix}

We can check this solution as follows:

Ax = \begin{bmatrix} 0&0 \\ 1&2 \\ 4&8 \\ 0&0 \end{bmatrix} \left( \begin{bmatrix} b_2 \\ 0 \end{bmatrix} + v \begin{bmatrix} -2 \\ 1 \end{bmatrix} \right) = \begin{bmatrix} 0&0 \\ 1&2 \\ 4&8 \\ 0&0 \end{bmatrix} \begin{bmatrix} b_2 - 2v \\ v \end{bmatrix}

= \begin{bmatrix} 0 \\ (b_2 - 2v) + 2v \\ 4(b_2 - 2v) + 8v \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ b_2 - 2v + 2v \\ 4b_2 - 8v + 8v \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ b_2 \\ 4b_2 \\ 0 \end{bmatrix}

The rank of A is 1, the number of basic variables (or pivots).

UPDATE: Corrected a typo found by Argiris.

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 2.2.4

Exercise 2.2.4. Consider the system of linear equations represented by the following matrix:

A = \begin{bmatrix} 0&1&4&0 \\ 0&2&8&0 \end{bmatrix}

Find the echelon matrix U, a set of basic variables, a set of free variables, and the general solution to Ax = 0. Then use elimination to find when the system Ax = b has a solution, and express that solution as the sum of a particular solution and the general solution to Ax = 0. Finally, find the rank of A.

Answer: We perform elimination on A by subtracting 2 times the first row from the second row (i.e., using the multiplier l_{21} = 2):

\begin{bmatrix} 0&1&4&0 \\ 0&2&8&0 \end{bmatrix} \Rightarrow \begin{bmatrix} 0&1&4&0 \\ 0&0&0&0 \end{bmatrix}

This completes elimination, and leaves us with the echelon matrix

U = \begin{bmatrix} 0&1&4&0 \\ 0&0&0&0 \end{bmatrix}

and the factorization A = LU:

\begin{bmatrix} 0&1&4&0 \\ 0&2&8&0 \end{bmatrix} = \begin{bmatrix} 1&0 \\ 2&1 \end{bmatrix} \begin{bmatrix} 0&1&4&0 \\ 0&0&0&0 \end{bmatrix}

We now solve for

Ax = \begin{bmatrix} 0&1&4&0 \\ 0&2&8&0 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = 0

which is equivalent to

Ux = \begin{bmatrix} 0&1&4&0 \\ 0&0&0&0 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = 0

The pivot in U is in column 2, so the (only) basic variable is v and the free variables are u, w and y.

From the first row of U we have v + 4w = 0 and thus v = -4w. We then have

x = \begin{bmatrix} u \\ -4w \\ w \\ y \end{bmatrix} = u \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} + w \begin{bmatrix} 0 \\ -4 \\ 1 \\ 0 \end{bmatrix} + y \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix}

In considering the inhomogeneous system Ax = b or

\begin{bmatrix} 0&1&4&0 \\ 0&2&8&0 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}

the elimination sequence above would produce the system Ux = c or

\begin{bmatrix} 0&1&4&0 \\ 0&0&0&0 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 - 2b_1 \end{bmatrix}

From the second equation we must have b_2 - 2b_1 = 0 or b_2 = 2b_1. Thus for Ax = b to have a solution the vector b must lie on the line passing through the origin and the point (1, 2) so that b = (b_1, 2b_1).

Taking b = (b_1, 2b_2) produces the system

\begin{bmatrix} 0&1&4&0 \\ 0&2&8&0 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} b_1 \\ 2b_1 \end{bmatrix}

which after elimination becomes

\begin{bmatrix} 0&1&4&0 \\ 0&0&0&0 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} b_1 \\ 0 \end{bmatrix}

The first equation gives v + 4w = b_1 or v = b_1 - 4w. Setting the free variables u, w, and y all to zero produces the particular solution x = (0, b_1, 0, 0) to the system

\begin{bmatrix} 0&1&4&0 \\ 0&2&8&0 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = \begin{bmatrix} b_1 \\ 2b_1 \end{bmatrix}

We can combine the particular solution to this system with the solution to Ax = 0 to produce the general solution for the system

x = \begin{bmatrix} 0 \\ b_1 \\ 0 \\ 0 \end{bmatrix} + u \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} + w \begin{bmatrix} 0 \\ -4 \\ 1 \\ 0 \end{bmatrix} + y \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix}

We can check this solution as follows:

Ax = \begin{bmatrix} 0&1&4&0 \\ 0&2&8&0 \end{bmatrix} \left( \begin{bmatrix} 0 \\ b_1 \\ 0 \\ 0 \end{bmatrix} + u \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} + w \begin{bmatrix} 0 \\ -4 \\ 1 \\ 0 \end{bmatrix} + y \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix} \right)

= \begin{bmatrix} 0&1&4&0 \\ 0&2&8&0 \end{bmatrix} \begin{bmatrix} u \\ b_1 - 4w \\ w \\ y \end{bmatrix} = \begin{bmatrix} (b_1-4w) + 4w \\ 2(b_1-4w) + 8w \end{bmatrix}

= \begin{bmatrix} b_1 - 4w + 4w \\ 2b_1 - 8w + 8w \end{bmatrix} = \begin{bmatrix} b_1 \\ 2b_1 \end{bmatrix}

The rank of A is 1, the number of basic variables (or pivots).

UPDATE: I expanded the answer to conform to the presentation in the answer to exercise 2.2.5.

UPDATE 2: I corrected the value for U used in various places. Thanks go to Zoi for catching this error!

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 2.2.3

Exercise 2.2.3. Consider the system of linear equations represented by the following matrix:

A = \begin{bmatrix} 1&2&0&1 \\ 0&1&1&0 \\ 1&2&0&1 \end{bmatrix}

Find the factorization A = LU, a set of basic variables, a set of free variables, a general solution to Ax = 0 (expressed as a linear combination as in equation (1) on page 73), and the rank of A.

Answer: We perform elimination on A by subtracting the first row from the third (i.e., using the multiplier l_{31} = 1):

\begin{bmatrix} 1&2&0&1 \\ 0&1&1&0 \\ 1&2&0&1 \end{bmatrix} \Rightarrow \begin{bmatrix} 1&2&0&1 \\ 0&1&1&0 \\ 0&0&0&0 \end{bmatrix}

This completes elimination, and leaves us with the factorization

U = \begin{bmatrix} 1&2&0&1 \\ 0&1&1&0 \\ 0&0&0&0 \end{bmatrix} \qquad L = \begin{bmatrix} 1&0&0 \\ 0&1&0 \\ 1&0&1 \end{bmatrix}

so that

LU = \begin{bmatrix} 1&0&0 \\ 0&1&0 \\ 1&0&1 \end{bmatrix} \begin{bmatrix} 1&2&0&1 \\ 0&1&1&0 \\ 0&0&0&0 \end{bmatrix} = \begin{bmatrix} 1&2&0&1 \\ 0&1&1&0 \\ 1&2&0&1 \end{bmatrix} = A

We now solve for

Ax = \begin{bmatrix} 1&2&0&1 \\ 0&1&1&0 \\ 1&2&0&1 \end{bmatrix} \begin{bmatrix} u \\ v \\ w \\ y \end{bmatrix} = 0

The pivots in U are in columns 1 and 2, so the basic variables are u and v and the free variables are w and y. The rank of A is 2, the number of basic variables (or pivots).

From the second row of A we have v + w = 0 and thus v = -w. From the first row of A we have u + 2v + y = 0 and can substitute for v to obtain u - 2w + y = 0 or u = 2w - y. We then have

x = \begin{bmatrix} 2w - y \\ -w \\ w \\ y \end{bmatrix} = w \begin{bmatrix} 2 \\ -1 \\ 1 \\ 0 \end{bmatrix} + y \begin{bmatrix} -1 \\ 0 \\ 0 \\ 1 \end{bmatrix}

UPDATE: Corrected the final equation (had w multiplying the second vector instead of y).

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 | Tagged , , | Leave a comment

Linear Algebra and Its Applications, Exercise 2.2.2

Exercise 2.2.2. Consider a system of linear equations that has more unknowns than there are equations and that has no solution. Provide the smallest example of such a system you can think of.

Answer: Systems of one linear equation and two unknowns (i.e., of the form ax + by = c) always have solutions. To find a system with no solution we therefore have to look at systems of two equations and three unknowns. For example, the system

\setlength\arraycolsep{0.2em}\begin{array}{rcrcrcr}u&+&v&+&w&=&0 \\ u&+&v&+&w&=&1 \end{array}

has no solution: Gaussian elimination (i.e., by subtracting the first equation from the second) would produce the contradiction 0 = 1.

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 2.2.1

Exercise 2.2.1. Consider the set of 2 by 3 echelon matrices. How many patterns are there for such matrices?

Answer: Suppose the first row of a 2 by 3 echelon matrix has a pivot in column 1. The second row could then have a pivot in column 2 or in column 3, or could have no pivot at all. This produces three possible patterns:

\begin{bmatrix} *&*&* \\ 0&*&* \end{bmatrix} \qquad \begin{bmatrix} *&*&* \\ 0&0&* \end{bmatrix} \qquad \begin{bmatrix} *&*&* \\ 0&0&0 \end{bmatrix}

If the first row has no pivot in column 1 but a pivot in column 2, then the second row could have a pivot in column 3 or no pivots at all:

\begin{bmatrix} 0&*&* \\ 0&0&* \end{bmatrix} \qquad \begin{bmatrix} 0&*&* \\ 0&0&0 \end{bmatrix}

If the pivot for the first row is in column 3, then the second row can have no pivots:

\begin{bmatrix} 0&0&* \\ 0&0&0 \end{bmatrix}

Finally, there could be no pivots in the first row, in which case the second row would not have pivots either; in other words, this corresponds to the zero matrix:

\begin{bmatrix} 0&0&0 \\ 0&0&0 \end{bmatrix}

There are thus seven possible patterns in all.

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 2.1.9

Exercise 2.1.9. Consider the set of all nonsingular 2 by 2 matrices. Is it a vector space? How about the set of singular 2 by 2 matrices?

Answer: The set of all nonsingular 2 by 2 matrices is not closed under addition; for example, the matrices

I = \begin{bmatrix} 1&0 \\ 0&1 \end{bmatrix} \qquad P = \begin{bmatrix} 0&1 \\ 1&0 \end{bmatrix}

are both nonsingular (and in fact are their own inverses), but the sum

I + P = \begin{bmatrix} 1&0 \\ 0&1 \end{bmatrix} + \begin{bmatrix} 0&1 \\ 1&0 \end{bmatrix} = \begin{bmatrix} 1&1 \\ 1&1 \end{bmatrix}

is singular. Since the set of nonsingular 2 by 2 matrices is not closed under addition it is not a vector space.

Next, consider the two singular matrices

A = \begin{bmatrix} 1&0 \\ 0&0 \end{bmatrix} \qquad B = \begin{bmatrix} 0&0 \\ 0&1 \end{bmatrix}

Their sum is nonsingular:

A + B = \begin{bmatrix} 1&0 \\ 0&0 \end{bmatrix} + \begin{bmatrix} 0&0 \\ 0&1 \end{bmatrix} = \begin{bmatrix} 1&0 \\ 0&1 \end{bmatrix} = I

So the set of singular  2 by 2 matrices is also not closed under addition, and thus is also not a vector space.

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