Linear Algebra/Exploration/Solutions

From Wikibooks, open books for an open world
< Linear Algebra‎ | Exploration
Jump to: navigation, search

Solutions[edit]

This exercise is recommended for all readers.
Problem 1

Evaluate the determinant of each.

  1. 
\begin{pmatrix}
3    &1   \\
-1    &1
\end{pmatrix}
  2. 
\begin{pmatrix}
2    &0   &1  \\
3    &1   &1 \\
-1    &0   &1
\end{pmatrix}
  3. 
\begin{pmatrix}
4    &0   &1  \\
0    &0   &1 \\
1    &3   &-1
\end{pmatrix}
Answer
  1.  4
  2.  3
  3.  -12
Problem 2

Evaluate the determinant of each.

  1.  \begin{pmatrix}
2  &0  \\
-1  &3
\end{pmatrix}
  2.  \begin{pmatrix}
2  &1  &1  \\
0  &5  &-2 \\
1  &-3 &4
\end{pmatrix}
  3.  \begin{pmatrix}
2  &3  &4  \\
5  &6  &7  \\
8  &9  &1
\end{pmatrix}
Answer
  1.  6
  2.  21
  3.  27
This exercise is recommended for all readers.
Problem 3

Verify that the determinant of an upper-triangular 3 \! \times \! 3 matrix is the product down the diagonal.


\det(
\begin{pmatrix}
a    &b   &c    \\
0    &e   &f    \\
0    &0   &i
\end{pmatrix}
)
=aei

Do lower-triangular matrices work the same way?

Answer

For the first, apply the formula in this section, note that any term with a  d ,  g , or  h is zero, and simplify. Lower-triangular matrices work the same way.

This exercise is recommended for all readers.
Problem 4

Use the determinant to decide if each is singular or nonsingular.

  1. 
\begin{pmatrix}
2    &1   \\
3    &1
\end{pmatrix}
  2. 
\begin{pmatrix}
0    &1   \\
1    &-1
\end{pmatrix}
  3. 
\begin{pmatrix}
4    &2   \\
2    &1
\end{pmatrix}
Answer
  1. Nonsingular, the determinant is  -1 .
  2. Nonsingular, the determinant is  -1 .
  3. Singular, the determinant is  0 .
Problem 5

Singular or nonsingular? Use the determinant to decide.

  1. 
\begin{pmatrix}
2    &1   &1  \\
3    &2   &2 \\
0    &1   &4
\end{pmatrix}
  2. 
\begin{pmatrix}
1    &0   &1  \\
2    &1   &1 \\
4    &1   &3
\end{pmatrix}
  3. 
\begin{pmatrix}
2    &1   &0  \\
3    &-2  &0 \\
1    &0   &0
\end{pmatrix}
Answer
  1. Nonsingular, the determinant is  3 .
  2. Singular, the determinant is  0 .
  3. Singular, the determinant is  0 .
This exercise is recommended for all readers.
Problem 6

Each pair of matrices differ by one row operation. Use this operation to compare  \det(A) with  \det(B) .

  1.  A=\begin{pmatrix}
1  &2  \\
2  &3
\end{pmatrix}   B=\begin{pmatrix}
1  &2  \\
0  &-1
\end{pmatrix}
  2.  A=\begin{pmatrix}
3  &1  &0  \\
0  &0  &1  \\
0  &1  &2
\end{pmatrix}    B=\begin{pmatrix}
3  &1  &0  \\
0  &1  &2  \\
0  &0  &1
\end{pmatrix}
  3.  A=\begin{pmatrix}
1  &-1 &3  \\
2  &2  &-6 \\
1  &0  &4
\end{pmatrix}    B=\begin{pmatrix}
1  &-1 &3  \\
1  &1  &-3 \\
1  &0  &4
\end{pmatrix}
Answer
  1.  \det(B)=\det(A) via  -2\rho_1+\rho_2
  2.  \det(B)=-\det(A) via  \rho_2\leftrightarrow\rho_3
  3.  \det(B)=(1/2)\cdot \det(A) via  (1/2)\rho_2
Problem 7

Show this.


\det(
\begin{pmatrix}
1    &1   &1    \\
a    &b   &c    \\
a^2  &b^2 &c^2
\end{pmatrix}
)
=(b-a)(c-a)(c-b)
Answer

Using the formula for the determinant of a 3 \! \times \! 3 matrix we expand the left side


1\cdot b\cdot c^2+1\cdot c\cdot a^2+1\cdot a\cdot b^2
-b^2\cdot c\cdot 1 -c^2\cdot a\cdot 1-a^2\cdot b\cdot 1

and by distributing we expand the right side.


(bc-ba-ac+a^2)\cdot(c-b)
=c^2b-b^2c-bac+b^2a-ac^2+acb+a^2c-a^2b

Now we can just check that the two are equal. (Remark. This is the  3 \! \times \! 3 case of Vandermonde's determinant which arises in applications).

This exercise is recommended for all readers.
Problem 8

Which real numbers  x make this matrix singular?


\begin{pmatrix}
12-x  &4  \\
8    &8-x
\end{pmatrix}
Answer

This equation


0=
\det(
\begin{pmatrix}
12-x  &4  \\
8    &8-x
\end{pmatrix}
)
=64-20x+x^2
=(x-16)(x-4)

has roots  x=16 and  x=4 .

Problem 9

Do the Gaussian reduction to check the formula for 3 \! \times \! 3 matrices stated in the preamble to this section.

 \begin{pmatrix}
a  &b  &c  \\
d  &e  &f  \\
g  &h  &i
\end{pmatrix} is nonsingular iff  aei+bfg+cdh-hfa-idb-gec \neq 0

Answer

We first reduce the matrix to echelon form. To begin, assume that  a\neq 0 and that  ae-bd\neq 0 .

\begin{array}{rcl}
\xrightarrow[]{(1/a)\rho_1}\;
\begin{pmatrix}
1   &b/a   &c/a   \\
d   &e     &f     \\
g   &h     &i
\end{pmatrix}                                           
&\xrightarrow[-g\rho_1+\rho_3]{-d\rho_1+\rho_2}
&\begin{pmatrix}
1   &b/a           &c/a           \\
0   &(ae-bd)/a     &(af-cd)/a     \\
0   &(ah-bg)/a     &(ai-cg)/a
\end{pmatrix}                                            \\
&\xrightarrow[]{(a/(ae-bd))\rho_2}
&\begin{pmatrix}
1   &b/a           &c/a             \\
0   &1             &(af-cd)/(ae-bd) \\
0   &(ah-bg)/a     &(ai-cg)/a
\end{pmatrix}
\end{array}

This step finishes the calculation.


\xrightarrow[]{((ah-bg)/a)\rho_2+\rho_3}
\begin{pmatrix}
1   &b/a    &c/a             \\
0   &1      &(af-cd)/(ae-bd)      \\
0   &0      &(aei+bgf+cdh-hfa-idb-gec)/(ae-bd)
\end{pmatrix}

Now assuming that a\neq 0 and  ae-bd\neq 0 , the original matrix is nonsingular if and only if the  3,3 entry above is nonzero. That is, under the assumptions, the original matrix is nonsingular if and only if aei+bgf+cdh-hfa-idb-gec\neq 0, as required.

We finish by running down what happens if the assumptions that were taken for convienence in the prior paragraph do not hold. First, if  a\neq 0 but  ae-bd=0 then we can swap


\begin{pmatrix}
1   &b/a           &c/a           \\
0   &0             &(af-cd)/a     \\
0   &(ah-bg)/a     &(ai-cg)/a
\end{pmatrix}                                  
\xrightarrow[]{\rho_2\leftrightarrow\rho_3}
\begin{pmatrix}
1   &b/a           &c/a           \\
0   &(ah-bg)/a     &(ai-cg)/a     \\
0   &0             &(af-cd)/a
\end{pmatrix}

and conclude that the matrix is nonsingular if and only if either  ah-bg=0 or  af-cd=0 . The condition " ah-bg=0 or  af-cd=0 " is equivalent to the condition " (ah-bg)(af-cd)=0 ". Multiplying out and using the case assumption that ae-bd=0 to substitute ae for bd gives this.


0=ahaf-ahcd-bgaf+bgcd
=ahaf-ahcd-bgaf+aegc
=a(haf-hcd-bgf+egc)

Since  a\neq 0 , we have that the matrix is nonsingular if and only if  haf-hcd-bgf+egc=0 . Therefore, in this  a\neq 0 and  ae-bd=0 case, the matrix is nonsingular when  haf-hcd-bgf+egc-i(ae-bd)=0 .

The remaining cases are routine. Do the  a=0 but  d\neq 0 case and the  a=0 and  d=0 but  g\neq 0 case by first swapping rows and then going on as above. The  a=0 ,  d=0 , and  g=0 case is easy— that matrix is singular since the columns form a linearly dependent set, and the determinant comes out to be zero.

Problem 10

Show that the equation of a line in  \mathbb{R}^2 thru  (x_1,y_1) and  (x_2,y_2) is expressed by this determinant.


\det(
\begin{pmatrix}
x   &y   &1  \\
x_1 &y_1 &1  \\
x_2 &y_2 &1
\end{pmatrix})=0 \qquad x_1\neq x_2
Answer

Figuring the determinant and doing some algebra gives this.

\begin{array}{rl}
0
&=y_1x+x_2y+x_1y_2-y_2x-x_1y-x_2y_1     \\
(x_2-x_1)\cdot y
&=(y_2-y_1)\cdot x+x_2y_1-x_1y_2              \\
y
&=\frac{y_2-y_1}{x_2-x_1}\cdot x+\frac{x_2y_1-x_1y_2}{x_2-x_1}
\end{array}

Note that this is the equation of a line (in particular, in contains the familiar expression for the slope), and note that  (x_1,y_1) and  (x_2,y_2) satisfy it.

This exercise is recommended for all readers.
Problem 11

Many people know this mnemonic for the determinant of a  3 \! \times \! 3 matrix: first repeat the first two columns and then sum the products on the forward diagonals and subtract the products on the backward diagonals. That is, first write


\left(\begin{array}{ccc|cc}
h_{1,1} &h_{1,2} &h_{1,3} &h_{1,1} &h_{1,2} \\
h_{2,1} &h_{2,2} &h_{2,3} &h_{2,1} &h_{2,2} \\
h_{3,1} &h_{3,2} &h_{3,3} &h_{3,1} &h_{3,2}
\end{array}\right)

and then calculate this.


\begin{array}{l}
h_{1,1}h_{2,2}h_{3,3}+h_{1,2}h_{2,3}h_{3,1}+h_{1,3}h_{2,1}h_{3,2} \\
\quad-h_{3,1}h_{2,2}h_{1,3}-h_{3,2}h_{2,3}h_{1,1}
-h_{3,3}h_{2,1}h_{1,2}
\end{array}
  1. Check that this agrees with the formula given in the preamble to this section.
  2. Does it extend to other-sized determinants?
Answer
  1. The comparison with the formula given in the preamble to this section is easy.
  2. While it holds for  2 \! \times \! 2 matrices
    \begin{array}{rl}
\left(\begin{array}{cc|c}
h_{1,1} &h_{1,2} &h_{1,1} \\
h_{2,1} &h_{2,2} &h_{2,1}
\end{array}\right)
&=\begin{array}{l}
h_{1,1}h_{2,2}+h_{1,2}h_{2,1}  \\
\quad-h_{2,1}h_{1,2}-h_{2,2}h_{1,1}
\end{array}                                     \\
&=h_{1,1}h_{2,2}-h_{1,2}h_{2,1}
\end{array}
    it does not hold for  4 \! \times \! 4 matrices. An example is that this matrix is singular because the second and third rows are equal
    
\begin{pmatrix}  
1  &0  &0  &1   \\
0  &1  &1  &0   \\
0  &1  &1  &0   \\
-1  &0  &0  &1  
\end{pmatrix}
    but following the scheme of the mnemonic does not give zero.
    
\left(\begin{array}{cccc|ccc}
1  &0  &0  &1  &1  &0  &0  \\
0  &1  &1  &0  &0  &1  &1  \\
0  &1  &1  &0  &0  &1  &1  \\
-1  &0  &0  &1  &-1 &0  &0
\end{array}\right)
=\begin{array}{l}
1+0+0+0 \\
\quad-(-1)-0-0-0
\end{array}
Problem 12

The cross product of the vectors


\vec{x}=\begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}
\qquad
\vec{y}=\begin{pmatrix} y_1 \\ y_2 \\ y_3 \end{pmatrix}

is the vector computed as this determinant.


\vec{x}\times\vec{y}=
\det(\begin{pmatrix}
\vec{e}_1  &\vec{e}_2  &\vec{e}_3  \\
x_1        &x_2        &x_3        \\
y_1        &y_2        &y_3
\end{pmatrix})

Note that the first row is composed of vectors, the vectors from the standard basis for \mathbb{R}^3. Show that the cross product of two vectors is perpendicular to each vector.

Answer

The determinant is 
(x_2y_3-x_3y_2)\vec{e}_1
+(x_3y_1-x_1y_3)\vec{e}_2
+(x_1y_2-x_2y_1)\vec{e}_3
. To check perpendicularity, we check that the dot product with the first vector is zero


\begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}
\cdot
\begin{pmatrix} x_2y_3-x_3y_2 \\ x_3y_1-x_1y_3 \\ x_1y_2-x_2y_1 \end{pmatrix}
=x_1x_2y_3-x_1x_3y_2+x_2x_3y_1-x_1x_2y_3+x_1x_3y_2-x_2x_3y_1=0

and the dot product with the second vector is also zero.


\begin{pmatrix} y_1 \\ y_2 \\ y_3 \end{pmatrix}
\cdot
\begin{pmatrix} x_2y_3-x_3y_2 \\ x_3y_1-x_1y_3 \\ x_1y_2-x_2y_1 \end{pmatrix}
=x_2y_1y_3-x_3y_1y_2+x_3y_1y_2-x_1y_2y_3+x_1y_2y_3-x_2y_1y_3=0
Problem 13

Prove that each statement holds for 2 \! \times \! 2 matrices.

  1. The determinant of a product is the product of the determinants \det(ST)=\det(S)\cdot\det(T).
  2. If  T is invertible then the determinant of the inverse is the inverse of the determinant  \det(T^{-1})=(\,\det(T)\,)^{-1} .

Matrices T and T^\prime are similar if there is a nonsingular matrix P such that T^\prime=PTP^{-1}. (This definition is in Chapter Five.) Show that similar  2 \! \times \! 2 matrices have the same determinant.

Answer
  1. Plug and chug: the determinant of the product is this
    \begin{array}{rl}
\det(\begin{pmatrix}
a  &b  \\
c  &d
\end{pmatrix}
\begin{pmatrix}
w  &x  \\
y  &z
\end{pmatrix}  )
&=
\det(\begin{pmatrix}
aw+by  &ax+bz  \\
cw+dy  &cx+dz
\end{pmatrix} )                 \\
&=
\begin{array}{l} 
acwx+adwz+bcxy+bdyz  \\
\quad -acwx-bcwz-adxy-bdyz
\end{array}
\end{array}
    while the product of the determinants is this.
    
\det(\begin{pmatrix}
a  &b  \\
c  &d
\end{pmatrix})
\cdot\det(\begin{pmatrix}
w  &x  \\
y  &z
\end{pmatrix})
=
(ad-bc)\cdot (wz-xy)
    Verification that they are equal is easy.
  2. Use the prior item.

That similar matrices have the same determinant is immediate from the above two: \det(PTP^{-1})=\det(P)\cdot\det(T)\cdot\det(P^{-1}).

This exercise is recommended for all readers.
Problem 14

Prove that the area of this region in the plane

Linalg parallelogram.png

is equal to the value of this determinant.


\det(
\begin{pmatrix}
x_1  &x_2  \\
y_1  &y_2
\end{pmatrix})

Compare with this.


\det(
\begin{pmatrix}
x_2  &x_1  \\
y_2  &y_1
\end{pmatrix})
Answer

One way is to count these areas

Linalg parallelogram area.png

by taking the area of the entire rectangle and subtracting the area of A the upper-left rectangle, B the upper-middle triangle, D the upper-right triangle, C the lower-left triangle, E the lower-middle triangle, and F the lower-right rectangle  (x_1+x_2)(y_1+y_2)-x_2y_1-(1/2)x_1y_1-(1/2)x_2y_2
-(1/2)x_2y_2-(1/2)x_1y_1-x_2y_1 . Simplification gives the determinant formula.

This determinant is the negative of the one above; the formula distinguishes whether the second column is counterclockwise from the first.

Problem 15

Prove that for  2 \! \times \! 2 matrices, the determinant of a matrix equals the determinant of its transpose. Does that also hold for  3 \! \times \! 3 matrices?

Answer

The computation for  2 \! \times \! 2 matrices, using the formula quoted in the preamble, is easy. It does also hold for  3 \! \times \! 3 matrices; the computation is routine.

This exercise is recommended for all readers.
Problem 16

Is the determinant function linear — is  \det(x\cdot T+y\cdot S)=x\cdot \det(T)+y\cdot \det(S) ?

Answer

No. Recall that constants come out one row at a time.


\det(
\begin{pmatrix}
2  &4  \\
2  &6  \\
\end{pmatrix})
=
2\cdot\det(\begin{pmatrix}
1  &2  \\
2  &6  \\
\end{pmatrix})
=
2\cdot 2\cdot \det(\begin{pmatrix}
1  &2  \\
1  &3  \\
\end{pmatrix})

This contradicts linearity (here we didn't need  S , i.e., we can take S to be the zero matrix).

Problem 17

Show that if  A is  3 \! \times \! 3 then  \det(c\cdot A)=c^3\cdot \det(A) for any scalar  c .

Answer

Bring out the  c 's one row at a time.

Problem 18

Which real numbers  \theta make


\begin{pmatrix}
\cos\theta  &-\sin\theta  \\
\sin\theta  &\cos\theta
\end{pmatrix}

singular? Explain geometrically.

Answer

There are no real numbers  \theta that make the matrix singular because the determinant of the matrix  \cos^2\theta+\sin^2\theta is never 0, it equals 1 for all \theta. Geometrically, with respect to the standard basis, this matrix represents a rotation of the plane through an angle of  \theta . Each such map is one-to-one — for one thing, it is invertible.

? Problem 19

If a third order determinant has elements  1 ,  2 , ...,  9 , what is the maximum value it may have? (Haggett & Saunders 1955)

Answer

This is how the answer was given in the cited source. Let  P be the sum of the three positive terms of the determinant and  -N the sum of the three negative terms. The maximum value of  P is


9\cdot 8\cdot 7 +6\cdot 5\cdot 4 +3\cdot 2\cdot 1=630.

The minimum value of  N consistent with  P is


9\cdot 6\cdot 1 +8\cdot 5\cdot 2 +7\cdot 4\cdot 3=218.

Any change in  P would result in lowering that sum by more than  4 . Therefore  412 the maximum value for the determinant and one form for the determinant is


\begin{vmatrix}
9  &4  &2  \\
3  &8  &6  \\
5  &1  &7
\end{vmatrix}.

References[edit]

  • Haggett, Vern (proposer); Saunders, F. W. (solver) (Apr. 1955), "Elementary problem 1135", American Mathematical Monthly (American Mathematical Society) 62 (5): 257