Math 252 Applied Linear Algebra Problem Notes on Take-Home Exams I to IX

1. (2 × 2 Linear System) Find all solutions to x_{1} − 5x_{2} = 0, −x_{1} + 5x_{2} = 0.

Solution to 1. To find all solutions to the system x_{1} − 5x_{2} = 0, −x_{1} + 5x_{2} = 0, use any method known to you, such as elimination. The strange part of this problem is the expression for the answer. To explain geometrically why the answer must be strange, observe that −x_{1} + 5x_{2} = 0 is the same as the first equation x_{1} − 5x_{2} = 0, therefore there are not two equations, but only one! The set of planar points satisfying the two equations is exactly the set of points on the straight line x_{1} − 5x_{2} = 0 (an infinite number of points). The standard form of the solution is obtained by solving for x_{1} in terms of x_{2}, e.g., x_{1} = 5x_{2}, then write out the vector solution X as follows:

X = ( \begin{matrix}x_{1} \\ x_{2} \end{matrix} ) = ( \begin{matrix}5x_{2} \\ x_{2} \end{matrix} ) = x_{2} ( \begin{matrix}5 \\ 1 \end{matrix} )

To each value of x_{2} corresponds a solution of the system of equations, i.e., there are infinitely many solutions.

1a. (2 × 4 Linear System) Find all solutions to x_{1} − x_{2} + 7x_{3} − x_{4} = 0, 2x_{1} + 3x_{2} − 8x_{3} + x_{4} = 0.

Solution to 1a. Subtract two times the first equation from the second to get 5x_{2} − 22x_{3} + 3x_{4} = 0. Divide the new equation by 5 to get x_{2} − \frac{22}{5}x_{3} + \frac{3}{5}x_{4} = 0. Keep this as the replacement for the second equation. Add it to the first equation to get its replacement x_{1} + \frac{13}{5}x_{3} − \frac{2}{5}x_{4} = 0. The replacement equations are therefore

x_{1} + \frac{13}{5}x_{3} − \frac{2}{5}x_{4} = 0,

x_{2} − \frac{22}{5}x_{3} + \frac{3}{5}x_{4} = 0,

which correspond exactly to the reduced row echelon form of the system. The general solution is

( \begin{matrix}x_{1} \\ x_{2} \\ x_{3} \\ x_{4} \end{matrix} ) = x_{3} ( −\frac{13}{5} ; \frac{22}{5} ; 1 ; 0 ) + x_{4} ( \frac{2}{5} ; −\frac{3}{5} ; 0 ; 1 ) .

2. (4×4 Linear System) Find a fraction-free Gauss-Elimination form and the Reduced Row-echelon form for the following equations: x_{1}−2x_{2}+x_{3}+x_{4} = 2, 3x_{1}+2x_{3}−2x_{4} = −8, 4x_{2}−x_{3}−x_{4} = 1, 5x_{1}+3x_{3}−x_{4} = 0.

Solution to 2. A fraction-free Gauss-Elimination form can be obtained from the reduced row echelon form by multiplying each row by a suitable factor, to clear the fractions. In reality, there are infinitely many fraction-free forms, so there is no way to give an answer that everyone will arrive at.

It turns out that the reduced row echelon form is also fraction-free, so it can be reported as the fractionfree answer!

The reduced row-echelon form is obtained from the augmented matrix by row operations, using the basic pivot algorithm. The answer for both questions:

rref = ( \begin{matrix}1 & 0 & 0 & 4 & 0 \\ 0 & 1 & 0 & −2 & 0 \\ 0 & 0 & 1 & −7 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{matrix} )

3. (4 × 3 Linear System) Find all solutions to the 4 × 3 system x_{1} + x_{2} − x_{3} = 0, 4x_{1} − x_{2} + 5x_{3} = 0, −2x_{1} + x_{2} − 2x_{3} = 0, 3x_{1} + 2x_{2} − 6x_{3} = 0.

Solution to 3. The augmented matrix and its reduced row echelon form are:

aug = ( \begin{matrix}1 & 1 & −1 & 0 \\ 4 & −1 & 5 & 0 \\ −1 & 1 & −2 & 0 \\ 3 & 2 & −6 & 0 \end{matrix} ) , rref = ( \begin{matrix}1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{matrix} )

It follows that X = 0 is the only solution.

3a. (3 × 4 Linear System) Find all solutions to x_{1} − x_{2} + x_{3} − x_{4} = −2, −2x_{1} + 3x_{2} − x_{3} + 2x_{4} = 5, 4x_{1} − 2x_{2} + 2x_{3} − 3x_{4} = 6.

Solution to 3a. The augmented matrix and its reduced row echelon form are:

aug = ( \begin{matrix}1 & −1 & 1 & −1 & −2 \\ −2 & 3 & −1 & 2 & 5 \\ 4 & −2 & 2 & −3 & 6 \end{matrix} ) , rref = ( \begin{matrix}1 & 0 & 0 & −1/2 & 5 \\ 0 & 1 & 0 & 1/4 & 4 \\ 0 & 0 & 1 & −1/4 & −3 \end{matrix} )

The standard form of the solution is obtained by identifying the lead variables and the arbitrary variables:

Variables x_{1}, x_{2} and x_{3} are the lead variables, because they correspond to a leading 1 in the RREF. See the boxed 1’s above. Variable x_{4} is the arbitrary variable, because arbitrary variables are the variables left over after removal of the lead variables.

The standard form of the solution X is obtained by replacing each lead variable with its corresponding equation, obtained from the RREF. The arbitrary variables are left untouched. Then:

X = ( \begin{matrix}x_{1} \\ x_{2} \\ x_{3} \\ x_{4} \end{matrix} ) = ( \begin{matrix}\frac{1}{2}x_{4} + 5 \\ \frac{−1}{4}x_{4} + 4 \\ \frac{1}{4}x_{4} − 3 \\ x_{4} \end{matrix} ) = x_{4} ( \frac{1}{2} ; \frac{−1}{4} ; 3 ; 1 ) + ( \begin{matrix}5 \\ 4 \\ −3 \\ 0 \end{matrix} )

3b. (3 × 4 Linear System) Use Gauss-Jordan elimination to find the general solution:

\begin{aligned}x_{1} & + & 2x_{2} & + & 4x_{3} & − & x_{4} & = & 3 \\ 3x_{1} & + & 4x_{2} & + & 5x_{3} & − & x_{4} & = & 7 \\ x_{1} & + & 3x_{2} & + & 4x_{3} & + & 5x_{4} & = & 4 \end{aligned}

Solution to 3b. The augmented matrix and its reduced row echelon form are:

aug = ( \begin{matrix}1 & 2 & 4 & −1 & 3 \\ 3 & 4 & 5 & −1 & 7 \\ 1 & 3 & 4 & 5 & 4 \end{matrix} ) , rref = ( \begin{matrix}1 & 0 & 0 & −5 & 1 \\ 0 & 1 & 0 & 6 & 1 \\ 0 & 0 & 1 & −2 & 0 \end{matrix} )

Variables x_{1}, x_{2} and x_{3} are the lead variables, because they correspond to a leading 1 in the RREF. See the boxed 1’s above. Variable x_{4} is the arbitrary variable, because arbitrary variables are the variables left over after removal of the lead variables.

The standard form of the solution is obtained by replacing the lead variables x_{1}, x_{2}, x_{3} by their equations (x_{1} = 5x_{4} + 1, x_{2} = −6x_{4} + 1, x_{3} = 2x_{4}), but the arbitrary variable x_{4} is untouched. Then:

X = ( \begin{matrix}x_{1} \\ x_{2} \\ x_{3} \\ x_{4} \end{matrix} ) = ( \begin{matrix}5x_{4} + 1 \\ −6x_{4} + 1 \\ 2x_{4} \\ x_{4} \end{matrix} ) = x_{4} ( \begin{matrix}5 \\ −6 \\ 2 \\ 1 \end{matrix} ) + ( \begin{matrix}1 \\ 1 \\ 0 \\ 0 \end{matrix} )

Important: This method for writing out X applies only in case the equations are in reduced echelon form. A matrix C is in reduced row echelon form provided each nonzero row starts with a leading 1, and above and below that leading 1 appear only zeros.

4. (Inverse Matrix) Compute the inverse of the matrix whose rows are [1, 0, 0], [−2, 0, 1], [4, 6, 1].

Solution to 4. The inverse of the matrix A whose rows are [1, 0, 0], [−2, 0, 1], [4, 6, 1] is obtained by forming the augmented matrix B = (A | I) and then the RREF of B. Alternatively, it can be computed from the adjugate or adjoint formula, using cofactors of A. The answer:

A^{−1} = ( \begin{matrix}1 & 0 & 0 \\ −1 & −1/6 & 1/6 \\ 2 & 1 & 0 \end{matrix} )

4a. (Invertible Matrices) Explain why the matrix whose rows are [1, 0, 0], [−2, 0, 0], [4, 6, 1] is not invertible.

Solution to 4a. The matrix whose rows are [1, 0, 0], [−2, 0, 0], [4, 6, 1] is not invertible, because the rows are dependent (the first and second rows are dependent). Alternatively, the rank is less than the row dimension. Finally, a third way to analyze it comes from the theory of determinants: a matrix is invertible if and only if its determinant is nonzero.

5. (Rank, Nullity and Nullspace) Find the rank, nullity and a basis for the null space, given A has rows [1, −1, 2, 3], [0, 1, 4, 3], [1, 0, 6, 6].

Solution to 5. Given A has rows [1, −1, 2, 3], [0, 1, 4, 3], [1, 0, 6, 6], then the reduced row echelon form of the augmented matrix (A | 0) is

rref(A) = ( \begin{matrix}1 & 0 & 6 & 6 & 0 \\ 0 & 1 & 4 & 3 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{matrix} )

The rank and nullity are both 2. The standard form of the solution X to the equation AX = 0 is obtained using lead variables x_{1}, x_{2} and arbitrary variables x_{3}, x_{4} as follows:

X = ( \begin{matrix}x_{1} \\ x_{2} \\ x_{3} \\ x_{4} \end{matrix} ) = ( \begin{matrix}−6x_{3} − 6x_{4} \\ −4x_{3} − 3x_{4} \\ x_{3} \\ x_{4} \end{matrix} ) = x_{3} ( \begin{matrix}−6 \\ −4 \\ 1 \\ 0 \end{matrix} ) + x_{4} ( \begin{matrix}−6 \\ −3 \\ 0 \\ 1 \end{matrix} )

A basis for the null space can be read off from this answer:

( \begin{matrix}−6 \\ −4 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}−6 \\ −3 \\ 0 \\ 1 \end{matrix} ) .

5a. (Rank, Nullity and Nullspace) Find the rank, nullity and a basis for the solution space of AX = 0, where

A = ( \begin{matrix}1 & 2 & 1 & −1 & 3 \\ 1 & 2 & 2 & 1 & 2 \\ 2 & 4 & 2 & −1 & 7 \end{matrix} ) , X = ( \begin{matrix}x \\ y \\ z \\ u \\ v \end{matrix} ) .

Solution to 5a. Rather than form (A | 0), we work with A itself and find the RREF and also the standard form of the solution:

A = ( \begin{matrix}1 & 2 & 1 & −1 & 3 \\ 1 & 2 & 2 & 1 & 2 \\ 2 & 4 & 2 & −1 & 7 \end{matrix} ) , rref(A) = ( \begin{matrix}1 & 2 & 0 & 0 & 7 \\ 0 & 0 & 1 & 0 & −3 \\ 0 & 0 & 0 & 1 & 1 \end{matrix} ) .

The rank is 3, the nullity 2. The solution is read off from the RREF by observing that the lead variables are x, z, u and the arbitrary variables are y, v. Then

X = ( \begin{matrix}x \\ y \\ z \\ u \\ v \end{matrix} ) = ( \begin{matrix}−2y − 7v \\ y \\ 3v \\ −v \\ v \end{matrix} ) = y ( \begin{matrix}−2 \\ 1 \\ 0 \\ 0 \\ 0 \end{matrix} ) + v ( \begin{matrix}−7 \\ 0 \\ 3 \\ −1 \\ 1 \end{matrix} ) .

A basis for the solution space of AX = 0 is given by

( \begin{matrix}−2 \\ 1 \\ 0 \\ 0 \\ 0 \end{matrix} ) , ( \begin{matrix}−7 \\ 0 \\ 3 \\ −1 \\ 1 \end{matrix} ) .

5b. (Rank, Nullity and Nullspace) Find the rank, nullity and a basis for the solution space of AX = 0, given

A = ( \begin{matrix}1 & −1 & 2 & 3 \\ −2 & 2 & −4 & −6 \\ 2 & −2 & 4 & 6 \\ 3 & −3 & 6 & 9 \end{matrix} ) , X = ( \begin{matrix}x \\ y \\ z \\ w \end{matrix} ) .

Solution to 5b. Rather than form (A | 0), we work with A itself and find the RREF and also the standard form of the solution:

A = ( \begin{matrix}1 & −1 & 2 & 3 \\ −2 & 2 & −4 & −6 \\ 2 & −2 & 4 & 6 \\ 3 & −3 & 6 & 9 \end{matrix} ) , rref(A) = ( \begin{matrix}1 & −1 & 2 & 3 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{matrix} ) .

The solution is read off from the RREF by observing that the lead variable is x and the arbitrary variables are y, z, w. Then

X = ( \begin{matrix}x \\ y \\ z \\ w \end{matrix} ) = ( \begin{matrix}y − 2z − 3w \\ y \\ z \\ w \end{matrix} ) = y ( \begin{matrix}1 \\ 1 \\ 0 \\ 0 \end{matrix} ) + z ( \begin{matrix}−2 \\ 0 \\ 1 \\ 0 \end{matrix} ) + w ( \begin{matrix}−3 \\ 0 \\ 0 \\ 1 \end{matrix} ) .

The rank is 1, the nullity is 3 and a basis for the null space is

( \begin{matrix}1 \\ 1 \\ 0 \\ 0 \end{matrix} ) , ( \begin{matrix}−2 \\ 0 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}−3 \\ 0 \\ 0 \\ 1 \end{matrix} ) .

Maple notes on problems 2–5b. Linear equations can be entered into maple without converting to matrix form. While this form is not convenient for solving the equations, there is a conversion routine called genmatrix which creates either the coefficient matrix or the augmented matrix. An example:

# Maple V.3 [Augmented matrix errors in V.1, V.2]
eq:=[2*x+3*y-z=0,3*x-4*y+5*z=8,y-z=9];
ans:=[x,y,z];
a:=genmatrix(eq,ans);
#                                 [ 2   3  -1 ]
#                             a:= [ 3  -4   5 ]
#                                 [ 0   1  -1 ]
#
aug:=genmatrix(eq,ans,1);
#  This is what your            [ 2   3  -1   0 ]
#  book calls the         aug:= [ 3  -4   5   8 ]
#  augmented matrix.            [ 0   1  -1   9 ]

The fraction–free Gauss-Jordan forms are not unique. The preferred form is given by the maple function ffgausselim. This form combined with the maple command backsub can be used to find the solution to a linear system. The Reduced Row Echelon form (RREF) is unique. In maple, the command is called rref or gaussjord, one being a synonym for the other. From this form the general solution of a linear system can determined by back-substitution using backsub. The RREF method is preferred for most applications done by hand computation. This form identifies the dependent variables as those corresponding to the leading 1’s. The other variables will appear as arbitrary constants in the general solution. For example, if the reduced form of an augmented matrix is (leading 1’s boxed)

( \begin{matrix}1 & −1 & 0 & 0 & 4 \\ 0 & 0 & 1 & 0 & −5 \\ 0 & 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 0 & 0 \end{matrix} ) ,

then x_{1}, x_{3} and x_{4} are dependent variables while x_{2} appears in the answer as an arbitrary constant:

( \begin{matrix}x_{1} \\ x_{2} \\ x_{3} \\ x_{4} \end{matrix} ) = ( \begin{matrix}4 \\ 0 \\ −5 \\ 2 \end{matrix} ) + x_{2} ( \begin{matrix}1 \\ 1 \\ 0 \\ 0 \end{matrix} ) .

The actual form of the answer in maple will contain variable names starting with the letter t. The factorization of the answer into basis elements for the kernel is not automatic. Here is an example of how to pass from the output of gausselim to the general solution, using backsub:

with(linalg):
a:=matrix([[1,3,-2,0,2,0],[2,6,-5,-2,4,-3],[0,0,5,10,0,15],[2,6,0,8,4,18]]);
b:=matrix([[0],[-1],[5],[6]]);
c:=augment(a,b);

M:=gausselim(c);
backsub(M);
#
#    [ 1  3  -2   0  2   0 ]        [  0 ]
#    [ 2  6  -5  -2  4  -3 ]        [ -1 ]
#a:= [                     ]   b := [    ]
#    [ 0  0   5  10  0  15 ]        [  5 ]
#    [ 2  6   0   8  4  18 ]        [  6 ]
#
#     [ 1  3  -2   0  2   0   0 ]        [ 1  3  -2   0  2   0   0 ]
#     [ 2  6  -5  -2  4  -3  -1 ]        [ 0  0  -1  -2  0  -3  -1 ]
#c := [                         ]   M := [                         ]
#     [ 0  0   5  10  0  15   5 ]        [ 0  0   0   0  0   6   2 ]
#     [ 2  6   0   8  4  18   6 ]        [ 0  0   0   0  0   0   0 ]
#
#               [ - 3 t2 - 4 t4 - 2 t5,  t2, - 2 t4,  t4,  t5,  1/3 ]

The format of the general solution obtained above is not what is normally written in a hand computation. Below is the general solution in the usual hand–written format:

#        [ x1 ]   [  0  ]      [ -3 ]      [ -4 ]      [ -2 ]
#        [ x2 ]   [  0  ]      [  1 ]      [  0 ]      [  0 ]
#        [ x3 ]   [  0  ]      [  0 ]      [ -2 ]      [  0 ]
#        [    ] = [     ] + t2 [    ] + t4 [    ] + t5 [    ]
#        [ x4 ]   [  0  ]      [  0 ]      [  1 ]      [  0 ]
#        [ x5 ]   [  0  ]      [  0 ]      [  0 ]      [  1 ]
#        [ x6 ]   [ 1/3 ]      [  0 ]      [  0 ]      [  0 ]

A maple procedure can be written to display the above general solution. The source file:

                                    /u/cl/maple/gensol.
# file "gensol"
with(linalg):                                   # Uses linalg package
gensolution:=proc(M)                            # M:=rref(augment(A,b)):
local x,y,n,w,v,s,u,i:
  x:=backsub(M):                                # Solve Ax=b
  n:=coldim(matrix([eval(x)])):                 # Get number of vars
  y:=[seq(x[i],i=1..n)]:                        # Make list of ans
  w:=[seq(t.i,i=1..n)]:                         # Make list of vars
  v:=[seq(x.i,i=1..n)]:                         # Make list of vars
  s:=matrix(n,1,subs(seq(w[i]=0,i=1..n),eval(y)) ): # Particular solution
  for i from 1 to n do
    u:=matrix(n,1,map(diff,eval(y),w[i])):            # basis vector
    if norm(u) <> 0 then s:=eval(s)+w[i]*eval(u): fi: # for variable w[i]
  od:
  s:=matrix(n,1,v)=eval(s):                     # Write out general solution
  RETURN(s):                                    # as an equation.
end:

As an example of how to use this procedure consider the following:

read gensol:
a:=matrix([[4,-1,2,6],[-1,5,-1,-3],[3,4,1,3] ]);
b:=matrix([[b1],[b2],[b3]]);
c:=augment(a,b);
M:=gausselim(c);
M[3,5]:=0:        # The system is consistent if and only if M[3,5]:=0
gensolution(M);
#

#      [  4  -1   2   6 ]       [ b1 ]        [  4  -1   2   6  b1 ]
# a := [ -1   5  -1  -3 ]  b := [ b2 ]   c := [ -1   5  -1  -3  b2 ]
#      [  3   4   1   3 ]       [ b3 ]        [  3   4   1   3  b3 ]
#
#
#      [ 4   -1     2     6        b1      ]      This system is inconsistent
# M := [ 0  19/4  -1/2  -3/2   b2 + 1/4 b1 ]      unless the last row is all
#      [ 0    0     0     0   b3 - b1 - b2 ]      zeros: b3 - b1 - b2=0.
#
#   [ x1 ]   [ 1/19 b2 + 5/19 b1 ]      [ -9/19 ]      [ -27/19 ]
#   [ x2 ]   [ 4/19 b2 + 1/19 b1 ]      [  2/19 ]      [  6/19  ]
#   [    ] = [                   ] + t3 [       ] + t4 [        ]
#   [ x3 ]   [         0         ]      [   1   ]      [    0   ]
#   [ x4 ]   [         0         ]      [   0   ]      [    1   ]

6. (Row Space and Column Space) Find bases for the row space, the column space and the null space of the matrix

A = ( \begin{matrix}4 & 1 & −3 & 5 \\ 2 & 0 & 0 & −2 \\ 6 & 2 & −6 & 12 \end{matrix} ) .

Solution to 6. Row reduction to RREF will give a basis for the row space of A. Row reduction for the transpose of A will give a basis for the column space of A.

A = ( \begin{matrix}4 & 1 & −3 & 5 \\ 2 & 0 & 0 & −2 \\ 6 & 2 & −6 & 12 \end{matrix} ) , rref(A) = ( \begin{matrix}1 & 0 & 0 & −1 \\ 0 & 1 & −3 & 9 \\ 0 & 0 & 0 & 0 \end{matrix} ) .

A^{t} = ( \begin{matrix}4 & 2 & 6 \\ 1 & 0 & 2 \\ −3 & 0 & −6 \\ 5 & −2 & 12 \end{matrix} ) , rref(A^{t}) = ( \begin{matrix}1 & 0 & 2 \\ 0 & 1 & −1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{matrix} ) .

The row space is generated by the basis

( 1, 0, 0, −1 ) , ( 0, 1, −3, 9 ) .

The column space is generated by the basis

( \begin{matrix}1 \\ 0 \\ 2 \end{matrix} ) , ( \begin{matrix}0 \\ 1 \\ −1 \end{matrix} ) .

The null space is generated from rref((A | 0)) by solving the equation AX = 0 for the standard form of the solution X, as follows:

rref((A | 0)) = ( \begin{matrix}1 & 0 & 0 & −1 & 0 \\ 0 & 1 & −3 & 9 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{matrix} ) ,

X = ( \begin{matrix}x_{1} \\ x_{2} \\ x_{3} \\ x_{4} \end{matrix} ) = ( \begin{matrix}x_{4} \\ 3x_{3} − 9x_{4} \\ x_{3} \\ x_{4} \end{matrix} ) = x_{3} ( \begin{matrix}0 \\ 3 \\ 1 \\ 0 \end{matrix} ) + x_{4} ( \begin{matrix}1 \\ −9 \\ 0 \\ 1 \end{matrix} ) .

A basis for the nullspace is therefore

( \begin{matrix}0 \\ 3 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}1 \\ −9 \\ 0 \\ 1 \end{matrix} ) .

6a. (Transpose of a Product of Symmetric Matrices) Prove that (AB)^{t} = BA for symmetric n × n matrices

A and B.

Solution to 8b. To prove that (AB)^{t} = BA for symmetric n × n matrices A and B, begin with the theorem (AB)^{t} = B^{t}A^{t} and use the hypothesis A^{t} = A, B^{t} = B.

7. (False Determinant Rules) Give an example in dimension 2 where det(A + B) ≠ det(A) + det(B).

Solution to 9. There are many examples in dimension 2 where det(A + B) ≠ det(A) + det(B). The easiest to find is A = B = I. There are many others.

8. (Determinant of a Symmetric Matrix) Assume A^{−1} = A^{t}. Prove that det(A) = ±1.

Solution to 10. Assume A^{−1} = A^{t}. We are to prove that det(A) = ±1. The determinant rules det(AB) = det(A) det(B) and det(A) = det(A^{t}) can be combined to show det(A)^{2} = 1, hence the claimed result.

8a. (Permutation Matrices Let P be a 3 × 3 matrix obtained from the identity matrix by interchanging columns. Argue from the cofactor expansion rule that det(P) = ±1.

Solution to 10a. Let P be a 3 × 3 matrix obtained from the identity matrix by interchanging columns. Then P must be one of the six matrices below:

( \begin{matrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix} ) , ( \begin{matrix}1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{matrix} ) , ( \begin{matrix}0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{matrix} ) ,

( \begin{matrix}0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{matrix} ) , ( \begin{matrix}0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{matrix} ) , ( \begin{matrix}0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{matrix} ) .

The cofactor expansion rule can be used to evaluate each of the six determinants and verify in each case that det(P) = ±1.

9. (Characteristic Equation) Prove that det(A − λI) equals

(−λ)^{3} + trace(A)(−λ)^{2} + (∑_{i=1}^{3} M_{ii})(−λ) + det(A)

where M_{ij} is the minor determinant of element ij of matrix A and trace(A) is the sum of the diagonal elements of A.

Solution to 11. The expansion of

det(A − λI) = | \begin{matrix}a_{11} − λ & a_{12} & a_{13} \\ a_{21} & a_{22} − λ & a_{23} \\ a_{31} & a_{32} & a_{33} − λ \end{matrix} |

using the cofactor expansion rule is long and tedious, but direct.

9a. (Vandermonde Determinant) Let

A = ( \begin{matrix}1 & 1 & 1 \\ x & y & z \\ x^{2} & y^{2} & z^{2} \end{matrix} ) .

Prove that det(A) = (y − x)(z − x)(z − y), by viewing the determinant as a quadratic polynomial in x having roots y and z. Solution to 11a. Let

f(x) = det ( \begin{matrix}1 & 1 & 1 \\ x & y & z \\ x^{2} & y^{2} & z^{2} \end{matrix} ) .

Then

f(y) = det ( \begin{matrix}1 & 1 & 1 \\ y & y & z \\ y^{2} & y^{2} & z^{2} \end{matrix} ) = 0, f(z) = det ( \begin{matrix}1 & 1 & 1 \\ z & y & z \\ z^{2} & y^{2} & z^{2} \end{matrix} ) = 0,

because a determinant vanishes if two columns are the same. By the cofactor expansion rule, f(x) is a quadratic polynomial in x, and since two roots are known, f(x) = c(x − y)(x − z), for some c, by the factor theorem of college algebra. Its easy to check that c is the coefficient of x^{2} in the cofactor expansion, and this can be evaluated directly as (z − y). Left out of this solution are the required page references to relevant textbooks (for the theorems used) and display of the required calculations .

9b. (Determinants) Prove that the determinant of any product of upper and lower triangular matrices is the product of the diagonal entries of all the matrices involved. Solution to 12. The result depends upon the formula det(AB) = det(A) det(B), valid for n × n matrices A and B. The formula implies that the determinant of a product of matrices is the product of their individual determinants. To finish the proof, it suffices to show that the determinant of a triangular matrix is the product of its diagonal elements. This last result is done by appeal to the cofactor expansion rule.

10. (Determinants) Evaluate det(A):

A = ( \begin{matrix}a & b & 0 & 0 \\ c & d & 0 & 0 \\ 0 & 0 & a & −b \\ 0 & 0 & c & d \end{matrix} )

Solution to 11b. The answer:

det ( \begin{matrix}a & b & 0 & 0 \\ c & d & 0 & 0 \\ 0 & 0 & a & −b \\ 0 & 0 & c & d \end{matrix} ) = (ad)^{2} − (bc)^{2}

because

det(A) = det ( \begin{matrix}a & b \\ c & d \end{matrix} ) · det ( \begin{matrix}a & −b \\ c & d \end{matrix} ) = (ad − bc)(ad + bc)

11. (Cramer’s Rule) Solve by Cramer’s rule: x_{1} + x_{2} + x_{3} = 6, 2x_{1} − x_{2} = 0, 2x_{1} + x_{3} = 1.

11a. (Cramer’s Rule) Solve by Cramer‘s Rule:

( \begin{matrix}1 & 1 & 1 & 1 \\ 2 & 0 & −1 & −1 \\ 0 & 0 & 3 & 6 \\ 0 & 0 & 0 & −1 \end{matrix} ) ( \begin{matrix}x \\ y \\ z \\ w \end{matrix} ) = ( \begin{matrix}6 \\ 4 \\ 3 \\ 5 \end{matrix} ) .

11b. (Cramer’s Rule) Use Cramer’s rule to calculate the unknown x_{3} if x_{1}, x_{2} and x_{3} satisfy the following system of linear equations:

\begin{aligned}2x_{1} & − & x_{2} & + & 2x_{3} & = & 2 \\ x_{1} & + & 10x_{2} & − & 3x_{3} & = & 5 \\ −x_{1} & + & x_{2} & + & 5x_{3} & = & −7 \end{aligned}

Solution to 13b. By Cramer’s rule, the unknown x_{3} is given by det(A_{3})/ det(A), where

A = ( \begin{matrix}2 & −1 & 2 \\ 1 & 10 & −3 \\ −1 & 1 & 5 \end{matrix} ) , A_{3} = ( \begin{matrix}2 & −1 & 2 \\ 1 & 10 & 5 \\ −1 & 1 & −7 \end{matrix} ) .

Therefore, x_{3} = −1.

12. (Inverse by Two Methods) Show that the matrix

A = ( \begin{matrix}−2 & 1 & 1 \\ 0 & 1 & 1 \\ −3 & 0 & 6 \end{matrix} )

is invertible and find the inverse matrix A^{−1} by two methods.

Solution to 8. The answer is

A^{−1} = ( \begin{matrix}−2 & 1 & 1 \\ 0 & 1 & 1 \\ −3 & 0 & 6 \end{matrix} )^{−1} = ( \begin{matrix}−1/2 & 1/2 & 0 \\ 1/4 & 3/4 & −1/6 \\ −1/4 & 1/4 & 1/6 \end{matrix} ) .

The first method is the RREF method, in which rref((A | I)) is computed, giving (I | A^{−1}). The second method is the adjoint method, which amounts to computing one 3 × 3 determinant and six 2 × 2 determinants. Kindly show all details, by hand. The adjoint matrix (transpose of the matrix of cofactors) and the 3 × 3 determinant are given by

adjoint(A) = ( \begin{matrix}6 & −6 & 0 \\ −3 & −9 & 2 \\ 3 & −3 & −2 \end{matrix} ) , det(A) = −12.

13. (Inverse of a Matrix) Calculate A^{−1} if it exists:

A = ( \begin{matrix}1 & 0 & 2 & 3 \\ −1 & 1 & 0 & 4 \\ 2 & 1 & −1 & 3 \\ −1 & 0 & 0 & 0 \end{matrix} )

Solution to 8a. The answer, obtained from rref((A | I)):

A = ( \begin{matrix}1 & 0 & 2 & 3 \\ −1 & 1 & 0 & 4 \\ 2 & 1 & −1 & 3 \\ −1 & 0 & 0 & 0 \end{matrix} ) , A^{−1} = ( \begin{matrix}0 & 0 & 0 & −1 \\ −4 & 9 & −8 & −29 \\ −1 & 3 & −3 & −10 \\ 1 & −2 & 2 & 7 \end{matrix} ) .

13a. (Inverse by the Adjoint Method) Compute by the adjoint method the inverse of the 4 × 4 Hilbert matrix

A = ( \begin{matrix}1 & 1/2 & 1/3 & 1/4 \\ 1/2 & 1/3 & 1/4 & 1/5 \\ 1/3 & 1/4 & 1/5 & 1/6 \\ 1/4 & 1/5 & 1/6 & 1/7 \end{matrix} )

Show all steps in the evolution of the solution, in particular, show explicitly the computation of det(A) and the 16 cofactors, and exhibit the final transposition of the matrix of cofactors. Solution to 7. The adjoint method for the inverse refers to the formula

A^{−1} = \frac{1}{det(A)} adjoint(A),

where adjoint(A) is the transpose of the matrix of cofactors of A. This problem is tedious without a computer algebra system, therefore, it is in your best interest to use maple for many of the steps.

The determinant of A is det(A) = \frac{1}{6048000}. Please show the computation steps for this determinant, using the cofactor expansion rule. The adjoint matrix is given by

adjoint(A) = ( \begin{matrix}\frac{1}{378000} & −\frac{1}{50400} & \frac{1}{25200} & −\frac{1}{43200} \\ −\frac{1}{50400} & \frac{1}{5040} & −\frac{1}{2240} & \frac{1}{3600} \\ \frac{1}{25200} & −\frac{1}{2240} & \frac{3}{2800} & −\frac{1}{1440} \\ −\frac{1}{43200} & \frac{1}{3600} & −\frac{1}{1440} & \frac{1}{2160} \end{matrix} ) .

Show all 16 steps in computing this matrix. Do the first one by hand and the others by machine. For example, the matrix formed from A by deleting row 1 and column 1 produces the first cofactor C_{11} as follows:

M_{11} = ( \begin{matrix}1/3 & 1/4 & 1/5 \\ 1/4 & 1/5 & 1/6 \\ 1/5 & 1/6 & 1/7 \end{matrix} ) , det(M_{11}) = \frac{1}{378000}, C_{11} = (−1)^{1+1} det(M_{11}) = \frac{1}{378000}.

The matrix of cofactors is [C_{ij}], but adjoint(A) is not this matrix, but instead the transpose! Leaving out a step produces the wrong matrix, but for this example, the inverse is symmetric, and the classic mistake (forgetting the transpose) does not surface. The answer for the inverse is

A^{−1} = \frac{1}{det(A)} adjoint(A) = ( \begin{matrix}16 & −120 & 240 & −140 \\ −120 & 1200 & −2700 & 1680 \\ 240 & −2700 & 6480 & −4200 \\ −140 & 1680 & −4200 & 2800 \end{matrix} ) .

Some maple hints. The command A:=hilbert(4); enters the matrix. And minor(A,1,1); produces the matrix formed by deleting row 1 and column 1. Evaluate determinants with det(B); where B is a square matrix. The maple command transpose(B); is used to form the transpose of a matrix B. The command adjoint(A); computes the transpose of the matrix of cofactors of A. The purpose of the exercise is to learn how to deal with large problems. Do enough hand computation to feel comfortable. Be driven to maple by tedium, after you have already obtained many of the correct answers by hand.

14. (Independence of Vectors) Use determinants and textbook theorems to determine whether the following vectors are linearly dependent.

a_{1} = ( \begin{matrix}−5 \\ 1 \\ 0 \end{matrix} ) , a_{2} = ( \begin{matrix}1 \\ −1 \\ −1 \end{matrix} ) , a_{3} = ( \begin{matrix}6 \\ 1 \\ 0 \end{matrix} ) .

Solution to 14. According to Cramer’s Rule, the vectors are linearly independent if and only if the matrix A whose columns are a_{1}, a_{2}, a_{3} has rank 3. This can be tested effectively with the RREF.

A = ( \begin{matrix}−5 & 1 & 6 \\ 1 & −1 & 1 \\ 0 & −1 & 0 \end{matrix} ) , rref(A) = ( \begin{matrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix} ) .

The rank is 3, therefore the vectors are linearly independent.

14a. (Divisibility) Let the 3×3 matrix A be formed by taking as its rows the 9 digits of three 3-digit integers, e.g., for 228, 266, 323 the matrix is

A = ( \begin{matrix}2 & 2 & 8 \\ 2 & 6 & 6 \\ 3 & 2 & 3 \end{matrix} ) .

Prove using Cramer’s rule: if an integer m divides each number, then m divides det(A) (e.g., 19 divides 228, 266 and 323 implies 19 divides det(A) in the illustration).

Solution to 14a. As an illustration, let

A = ( \begin{matrix}2 & 2 & 8 \\ 2 & 6 & 6 \\ 3 & 2 & 3 \end{matrix} ) , b = ( \begin{matrix}228 \\ 266 \\ 323 \end{matrix} ) , X = ( \begin{matrix}100 \\ 10 \\ 1 \end{matrix} ) .

Then the system of equations AX = b is satisfied. According to Cramer’s rule, each of the integer entries of X is a quotient det(C)/ det(A) for some matrix C. In particular, the third component of X equal to one implies that det(A) = det(C), where C is the matrix A with the last column replaced by b. Write the last column of C in factored form (19 factors out of each entry) and see what it says.

Maple notes on problem 6-14a. The method for computing an inverse matrix suggested in most linear algebra texts involves augmentation of the original matrix A with the identity matrix I of the same size to create a new matrix C. This matrix C is subjected to RREF to determine the inverse A^{−1}. A second method is possible, which is based upon Cramer’s Rule. The formula

A^{−1} = (1/ det(A))adjoint(A)

is reproduced by these hand calculations:

(a) Compute the matrix M of minors of A, i.e., M_{ij} is the minor determinant of element a_{ij} in matrix A.

(b) Introduce signs into the elements of M by the Checkerboard Rule: element M_{ij} gets a negative sign if i + j is odd. The new matrix is called C; it is the matrix of cofactors of A.

(c) Transpose the matrix C to obtain the adjoint matrix of A, called D. Maple can produce this matrix directly from A by the command D:=adjoint(A).

(d) Compute the determinant det(A) and divide it into each element of the adjoint D; this is the inverse A^{−1}.

Maple can compute the determinant with command det(A) and the inverse in one step with the command

inverse(A).

The classical hand computation of Cramer’s Rule should be learned by everyone because it appears often in scientific literature. To this end we consider the following maple example:

with(linalg):
a:=matrix([[1,0,-1],[-1,1,0],[0,0,-1]]);
b:=vector([3,-5,2]);
#The column b replaces columns 1, 2, 3 of matrix a:
a1:=augment(b,col(a,2),col(a,3)); # Replace col 1 by b
a2:=augment(col(a,1),b,col(a,3)); # Replace col 2 by b
a3:=augment(col(a,1),col(a,2),b); # Replace col 3 by b
#The answers x, y, z are quotients of determinants:
x:=det(a1)/det(a); y:=det(a2)/det(a); z:=det(a3)/det(a);
      [  1  0  -1 ]
 a := [ -1  1   0 ]    b := [ 3, -5, 2 ]
      [  0  0  -1 ]
      [  3  0  -1 ]           [  1   3  -1 ]           [  1  0   3 ]
a1 := [ -5  1   0 ]     a2 := [ -1  -5   0 ]     a3 := [ -1  1  -5 ]
      [  2  0  -1 ]           [  0   2  -1 ]           [  0  0   2 ]
# Solve aX=b for X=vector([x,y,z]):
      x := 1 y := -4 z := -2

The rank of a matrix A is the number of nonzero rows in the Reduced Row Echelon form of A. The nullity of A is the number of variables minus the rank, which in the case of a square matrix, equals the number of zero rows in the RREF. It is a common and fatal error to compute the nullity as the number of zero rows in the RREF (it only applies when the matrix happens to be square)! There is a maple command rank which applies to compute the rank of a matrix A: rank(A). There is presently no command for the nullity, because it depends upon the number of variables, and only you can know if the given A is augmented or not. Be warned that application of the rank command to an augmented matrix can fail to give the correct answer: the augmented column may produce an inconsistent RREF and hence an incorrect count of nonzero rows! There are various maple commands available for computing the rank and kernel (or nullspace) of a matrix A. They are: rref, gausselim, rank, kernel. The first two produce forms from which the rank can be deduced. The command rank(A) gives this number directly. A basis for the solutions of Ax = 0 can be found by the command kernel(A). A common error with the latter command is to apply it to an augmented matrix, which casts the problem Ax = 0 into the wrong space dimension. Maple can be used to compute a basis for the row space of a matrix A. The command is rowspace(A). The column space of a matrix A has a basis which can be obtained by the maple command colspace(A). The nullspace of matrix A is the set of all solutions x of the equation Ax = 0. A basis for the nullspace is obtained by the maple command nullspace(A) or kernel(A) (the terms nullspace and kernel are equivalent). Here is an example:

with(linalg):
A := matrix(3,2,[2,0,3,4,0,5]);
rowspace(A);
colspace(A);
kernel(A);
kernel(transpose(A));
A1:=rref(A);
A2:=rref(transpose(A));
#
#            [ 2  0 ]
#       A := [ 3  4 ]

#            [ 0  5 ]
#
#      {[ 1, 0 ], [ 0, 1 ]}
#
#      {[1, 0, -15/8 ], [ 0, 1, 5/4 ]}
#
#      {}
#
#      {[ 15/8, -5/4, 1 ]}
#
#          [ 1  0 ]            [ 1  0  -15/8 ]
#    A1 := [ 0  1 ]      A2 := [             ]
#          [ 0  0 ]            [ 0  1   5/4  ]

As is apparent from this example, the commands colspace and rowspace can be replaced by extraction of nonzero rows from the reduced row echelon forms for A and A^{t}.

Eigenvalues and Eigenvectors. Find the eigenvalues, eigenvectors, geometric multiplicity and algebraic multiplicity.

15. (2 Eigenvalues and 3 Eigenvectors)

A = ( \begin{matrix}5 & 4 & 2 \\ 4 & 5 & 2 \\ 2 & 2 & 2 \end{matrix} ) .

Solution to 15. To find the eigenvalues of the matrix

A = ( \begin{matrix}5 & 4 & 2 \\ 4 & 5 & 2 \\ 2 & 2 & 2 \end{matrix} )

it is required to solve for the roots of the characteristic equation

0 = det(A − λI) = 10 − 21 λ + 12 λ^{2} − λ^{3} = (10 − λ) (λ − 1)^{2}

The eigenvalues are therefore 10, 1 and 1. The eigenvector for λ = 10 is found by solving AX = 10X or equivalently (A − 10I)X = 0, which is a null space problem. The RREF of A − (10)I is found (with some effort) and we obtain eigenvalue, eigenvector pair

λ = 10, X = ( \begin{matrix}2 \\ 2 \\ 1 \end{matrix} ) .

In a similar way, we find the RREF of A − (1)I has a basis of two elements, giving the eigenvalue, eigenvector pairs

λ = 1, X = ( \begin{matrix}0 \\ 1 \\ −2 \end{matrix} ) , λ = 1, X = ( \begin{matrix}1 \\ 0 \\ −2 \end{matrix} ) .

Left out of these notes is the tedious task of finding RREF’s and standard forms of the solution for two null space problems (one problem for each eigenvalue). In a student solution, these details must not be left out!

15a. (1 Eigenvalue and 1 Eigenvector)

A = ( \begin{matrix}0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & −3 & 3 \end{matrix} ) .

Solution to 15a. To find the eigenvalues of the matrix

A = ( \begin{matrix}0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & −3 & 3 \end{matrix} )

requires solving for the roots of the characteristic equation

0 = det(A − λI) = 3 λ^{2} − λ^{3} − 3 λ + 1 = (1 − λ)^{3}.

There is only one eigenvalue and therefore only one null space problem to solve, namely AX = X or (A − I)X = 0. The RREF of A − I is found to have rank 2, nullity 1, so there is only one eigenvalue, eigenvector pair:

λ = 1, X = ( \begin{matrix}1 \\ 1 \\ 1 \end{matrix} ) .

16. (1 Eigenvalue and 1 Eigenvector)

A = ( \begin{matrix}−3 & −7 & −5 \\ 2 & 4 & 3 \\ 1 & 2 & 2 \end{matrix} ) .

Solution to 16. To find the eigenvalues of the matrix

A = ( \begin{matrix}−3 & −7 & −5 \\ 2 & 4 & 3 \\ 1 & 2 & 2 \end{matrix} )

requires solving for the roots of the characteristic equation

0 = det(A − λI) = (1 − λ)^{3}.

There is only one eigenvalue, eigenvector pair:

λ = 1, X = ( \begin{matrix}−3 \\ 1 \\ 1 \end{matrix} ) .

16a. (3 Eigenvalues and 3 Eigenvectors)

A = ( \begin{matrix}5 & 0 & 2 \\ 0 & 7 & −2 \\ 2 & −2 & 6 \end{matrix} ) .

Solution to 16a. To find the eigenvalues of the matrix

A = ( \begin{matrix}5 & 0 & 2 \\ 0 & 7 & −2 \\ 2 & −2 & 6 \end{matrix} ) .

requires solving for the roots of the characteristic equation

0 = det(A − λI) = (λ − 3) (6 − λ) (λ − 9) .

The eigenpairs are

λ = 3, X = ( \begin{matrix}−2 \\ 1 \\ 2 \end{matrix} ) , λ = 6, X = ( \begin{matrix}2 \\ 2 \\ 1 \end{matrix} ) , λ = 9, X = ( \begin{matrix}1 \\ −2 \\ 2 \end{matrix} ) .

Maple notes on problems 15–16a. The notions of algebraic multiplicity and geometric multiplicity are integer counts taken from certain calculations. Both require that the characteristic equation be solved:

det(A − λI) = 0.

The algebraic multiplicity of λ is the number of times root λ is repeated. For example, in the equation

(λ − 1)^{3}(λ + 3)^{2}(λ^{2} + 16) = 0

the roots 1, −3, 4i, −4i are repeated 3, 2, 1, 1 times respectively, hence their algebraic multiplicities are 3, 2, 1, 1. The geometric multiplicity of a root λ of the characteristic equation is the number of independent eigenvectors for λ, that is, the number of independent solutions x to the equation (A − λI)x = 0. This number can be found without computing eigenvectors. Precisely, the geometric multiplicity of root λ is the number of arbitrary variables in the general solution. This number is exactly the nullity of the matrix A − λI, which is the number of variables minus the rank. If the eigenvectors are not needed, then it suffices to compute rank(A-λ I). If the eigenvectors are actually needed, then maple determines the count as the number of basis vectors in the calculation kernel(D) where D = A − λI. A third way to obtain the count is to apply the maple command eigenvects(A), which contains the desired count in an encrypted syntax (along with additional information). Here is an example which shows how to compute the eigenvalues and eigenvectors and incidentally calculate the algebraic and geometric multiplicities:

with(linalg):
A:=matrix([[1,3,-2,0],[2,6,-5,-2],[0,0,5,10],[2,6,0,8]]);
J:=diag(1,1,1,1);
#
#       [ 1  3  -2   0 ]           [ 1  0  0  0 ]
#       [ 2  6  -5  -2 ]           [ 0  1  0  0 ]
#  A := [              ]       J:= [            ]
#       [ 0  0   5  10 ]           [ 0  0  1  0 ]
#       [ 2  6   0   8 ]           [ 0  0  0  1 ]
#
u:=[eigenvals(A)];              # Make an eigenvalue list
#                               # Brackets are not a mistake!
#                                         1/2           1/2
#                    u := [0, 0, 10 + I 43   , 10 - I 43   ]
#
# Algebraic multiplicities are 2,1,1 because 0 is repeated.
#
# Now solve the kernel problems for all eigenvalues u[1]..u[4].
#
v1:=kernel(evalm(A-u[1]*J));
v2:=kernel(evalm(A-u[2]*J));        # Duplicate computation!
v3:=kernel(evalm(A-u[3]*J));
v4:=kernel(evalm(A-u[4]*J));
#                  v1:={[ -3, 1, 0, 0 ], [ -4, 0, -2, 1 ]}
#                  v2:={[ -3, 1, 0, 0 ], [ -4, 0, -2, 1 ]}
evalf(map(evalc,v3[1]),3);
#           [  - .150 - .328 I,  - .500 - .656 I, 1., .500 - .656 I ]
evalf(map(evalc,v4[1]),3);
#           [  - .150 - .328 I,  - .500 - .656 I, 1., .500 - .656 I ]
#
#       Geometric multiplicities:       ev=0                  mult=2
#                                       ev=10.00 + 6.56 I     mult=1
#                                       ev=10.00 - 6.56 I     mult=1

It is possible to compute the eigenvalues of a matrix A numerically by the maple command Eigenvals, rather than symbolically, as is done by eigenvals(A). This is recommended for those cases when the maple output from eigenvals(A) is too complicated to read. The answers usually require interpretation, as in the following, where one eigenvalue of 0 is computed as −0.874 × 10^{−9}:

with(linalg):
A:=matrix([[1,3,-2,0],[2,6,-5,-2],[0,0,5,10],[2,6,0,8]]);
evalf(Eigenvals(A),3);          # Numeric eigenvalues
                          # are not used for computations!
#                         -9
#               [ -.874*10  , 10.00 + 6.56 I, 10.00 - 6.56 I, 0 ]
#

Differential Equations. The general solution of a matrix differential equation x′(t) = Ax(t) can be written as x(t) = ∑_{k=1}^{n} c_{k}X_{k}e^{λ_{k}t} where c_{1} to c_{n} are arbitrary constants, λ_{1} to λ_{n} are the distinct eigenvalues of A with corresponding eigenvectors X_{1} to X_{n}. This solution works only when A has n distinct eigenvalues.

17. (Differential Equations) Find the general solution of the system of differential equations x′(t) = Ax(t) where

A = ( \begin{matrix}2 & −4 & 4 \\ 0 & −2 & 1 \\ 0 & 0 & −1 \end{matrix} ) .

Solution to 17. To solve differential equations x′ = Ax where A is a square matrix we apply the standard theorem that says, for dimension 3,

x = c_{1}v_{1} exp(λ_{1}t) + c_{2}v_{2} exp(λ_{2}t) + c_{3}v_{3} exp(λ_{3}t)

where λ_{1}, λ_{2}, λ_{3} are the distinct eigenvalues of the matrix A with corresponding eigenvectors v_{1}, v_{2}, v_{3}. The symbols c_{1}, c_{2}, c_{3} represent arbitrary constants in the general solution.

The above method is applicable only in the case where A has distinct eigenvalues. Methods exist to solve the problem for a general matrix A, however, the theory is beyond the scope of the linear algebra already developed.

The general solution of the system of differential equations x′(t) = Ax(t) where

A = ( \begin{matrix}2 & −4 & 4 \\ 0 & −2 & 1 \\ 0 & 0 & −1 \end{matrix} )

is given by

x(t) = c_{1} exp(2t) ( \begin{matrix}1 \\ 0 \\ 0 \end{matrix} ) + c_{2} exp(−2t) ( \begin{matrix}1 \\ 1 \\ 0 \end{matrix} ) + c_{3} exp(−t) ( \begin{matrix}0 \\ 1 \\ 1 \end{matrix} )

17a. (Differential Equations) Solve for the vector solution x(t) in x′(t) = Ax(t), given

A = ( \begin{matrix}4 & 0 & 1 \\ 0 & 2 & 1 \\ 0 & 0 & 3 \end{matrix} ) .

Solution to 17a. The vector solution x(t) in x′(t) = Ax(t), given

A = ( \begin{matrix}4 & 0 & 1 \\ 0 & 2 & 1 \\ 0 & 0 & 3 \end{matrix} ) ,

is given by

x(t) = c_{1} exp(2t) ( \begin{matrix}0 \\ 1 \\ 0 \end{matrix} ) + c_{2} exp(4t) ( \begin{matrix}1 \\ 0 \\ 0 \end{matrix} ) + c_{3} exp(3t) ( \begin{matrix}1 \\ −1 \\ −1 \end{matrix} )

18. (Diagonalization) Test for diagonalizability and find the diagonal form.

A = ( \begin{matrix}3 & −1 & −1 \\ 1 & 1 & −1 \\ 1 & −1 & 1 \end{matrix} ) .

Solution to 18. A practical test for diagonalizability of a square matrix A is as follows:

(a) Compute all eigenvalues of A. If they are distinct, then A is diagonalizable.

(b) If test (a) fails, then compute the eigenvectors of A. If the number of independent eigenvectors equals the dimension of A then A is diagonalizable.

If either case (a) or (b) holds, then A is diagonalizable and its diagonal form is the diagonal matrix of eigenvalues. The maple command Eigenvals(A) (Cap E, not lowercase e) is not very useful for deciding case (a) because the numerical values may be distinct but the actual values identical — see the example above. The command eigenvects(A) can be used to decide case (b). By standard theory, case (b) holds whenever case (a) holds, so you might deduce that case (a) can be eliminated. However, computational complexity often dictates that (a) be checked first.

Diagonalizability for

A = ( \begin{matrix}3 & −1 & −1 \\ 1 & 1 & −1 \\ 1 & −1 & 1 \end{matrix} )

is tested by first computing the eigenvalues. They are 1, 2, 2, not distinct, so we have to check the geometric multiplicity of λ = 2. If it’s 2, then the total geometric multiplicity is 3 and A is diagonalizable with diagonal form

( \begin{matrix}1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \end{matrix} ) .

Otherwise, its not diagonalizable. The geometric multiplicity question is equivalent to finding the nullity of A − 2I. So we find the rank of A − 2I and subtract from 3 (the number of variables). A quick check gives rank 1, so the nullity is 2 and A is diagonalizable.

18a. (Diagonalization) Test for diagonalizability and find the diagonal form.

A = ( \begin{matrix}−2 & −2 & 0 & 0 \\ −5 & 1 & 0 & 0 \\ 0 & 0 & 2 & −1 \\ 0 & 0 & 5 & −2 \end{matrix} ) .

Solution to 18a. Diagonalizability for

A = ( \begin{matrix}−2 & −2 & 0 & 0 \\ −5 & 1 & 0 & 0 \\ 0 & 0 & 2 & −1 \\ 0 & 0 & 5 & −2 \end{matrix} ) .

is tested by first computing the eigenvalues. They are 3, −4, i and −i (i = \sqrt{−1}). So the eigenvalues are distinct and A is diagonalizable with diagonal form

( \begin{matrix}3 & 0 & 0 & 0 \\ 0 & −4 & 0 & 0 \\ 0 & 0 & i & 0 \\ 0 & 0 & 0 & −i \end{matrix} ) .

19. (Orthogonal Matrices) Find an orthogonal matrix Q such that Q^{t}AQ is diagonal:

A = ( \begin{matrix}1 & −1 & 0 & 0 \\ −1 & 3 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 2 \end{matrix} ) .

Solution to 19. A square matrix Q is orthogonal if each column has length 1 and the columns of Q are pairwise orthogonal, that is, X · Y = 0 for any pair of columns X and Y of Q. The matrix P of eigenvectors of a symmetric matrix A already satisfies P^{−1}AP = D, where D is the diagonal matrix of eigenvalues. An orthogonal matrix Q is constructed from P by changing its columns to unit vectors, accomplished by dividing each column by its length. Then Q is orthogonal, Q^{−1} = Q^{t}, and the equation Q^{t}AQ = D holds. The eigenvalues and eigenvectors of the matrix

A = ( \begin{matrix}1 & −1 & 0 & 0 \\ −1 & 3 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 2 \end{matrix} )

are found to be

λ = 2 + \sqrt{2}, X = ( \begin{matrix}1 − \sqrt{2} \\ 1 \\ 0 \\ 0 \end{matrix} ) , λ = 2 − \sqrt{2}, X = ( \begin{matrix}1 + \sqrt{2} \\ 1 \\ 0 \\ 0 \end{matrix} ) ,

λ = 0, X = ( \begin{matrix}0 \\ 0 \\ 1 \\ 0 \end{matrix} ) , λ = 2, X = ( \begin{matrix}0 \\ 0 \\ 0 \\ 1 \end{matrix} ) .

Let a = \sqrt{4 − 2\sqrt{2}}, b = \sqrt{4 + 2\sqrt{2}} be the norms of the first two eigenvectors. The matrix Q of normalized eigenvectors is given by

Q = ( \begin{matrix}(1 − \sqrt{2})/a & (1 + \sqrt{2})/b & 0 & 0 \\ 1/a & 1/b & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{matrix} )

It is possible to show directly that the columns of Q have unit length and are pairwise orthogonal. Therefore, Q is orthogonal, which means Q^{−1} = Q^{t}. Finally, Q^{t}AQ is the diagonal matrix of eigenvalues:

( \begin{matrix}2 + \sqrt{2} & 0 & 0 & 0 \\ 0 & 2 − \sqrt{2} & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 2 \end{matrix} ) .

Maple notes on 17–19. A symmetric matrix A with distinct eigenvalues can be transformed to diagonal form D = diag(λ_{1}, …, λ_{n}) by the matrix Q of its normalized eigenvectors: Q^{−1}AQ = D. The algorithm for finding Q is as follows:

(a) Let u:=[eigenvals(A)]. The values should be distinct.

(b) Evaluate

                                   v:=kernel(evalm(A-u[i]*J))

for i = 1, …, n. Save the n columns

                                  evalm(v/sqrt(dotprod(v,v)))

in a matrix Q using initially Q:=v and then Q:=augment(Q,v) to add columns one at a time until n columns are filled.

There is the possibility of using eigenvects(A) to produce the values v of step (b) above. Sometimes norm(v,2) produces unevaluated absolute values — use sqrt(dotprod(v,v)) instead of norm(v,2). It is remarked that the above algorithm applies only to symmetric matrices. Application to nonsymmetric matrices is considered a logical error (the calculation may produce no error message but the answer is likely incorrect).

with(linalg):
A:=matrix([[16,-3/2],[-3/2,4]]);
v:=[eigenvals(A)]; n:=coldim(A): J:=diag(seq(1,i=1..n)):
for i from 1 to n do
  w:=kernel(evalm(A-v[i]*J));
  y:=evalm(w[1]/sqrt(dotprod(w[1],w[1]))):
  y:=evalf(map(evalc,y),3):
  if i=1 then Q:=matrix(n,1,y): else
     Q:=augment(Q,matrix(n,1,y)): fi:
od:
Q = evalf(eval(Q),3);
#
# Applies only to symmetric matrices!
#
#       [  16   -3/2 ]            [  .990  .122 ]
#  A := [            ]        Q = [             ]
#       [ -3/2    4  ]            [ -.119  .991 ]
#
#                                      1/2             1/2
#                     v := [10 + 3/2 17   , 10 - 3/2 17   ]
#

Quadratic Forms. Write the given quadratic as as AX · X for some symmetric matrix A.

20. (Quadratic Form in R^{4}) x_{1}^{2} − x_{2}^{2} + x_{1}x_{3} − x_{2}x_{4} + x_{3}^{2} + x_{4}^{2}

Solution to 20. The quadratic x_{1}^{2} − x_{2}^{2} + x_{1}x_{3} − x_{2}x_{4} + x_{3}^{2} + x_{4}^{2} transforms to AX · X where

X = ( \begin{matrix}x_{1} \\ x_{2} \\ x_{3} \\ x_{4} \end{matrix} ) , A = ( \begin{matrix}1 & 0 & 1/2 & 0 \\ 0 & −1 & 0 & −1/2 \\ 1/2 & 0 & 1 & 1 \\ 0 & −1/2 & 0 & 1 \end{matrix} ) .

Example. Write the quadratic form

x_{1}^{2} − x_{2}^{2} + x_{1}x_{3} − 3x_{2}x_{4} + 4x_{3}^{2} + x_{4}^{2} = 10

in the matrix form X^{t}AX = 10 for some symmetric matrix A.

Define

X = ( \begin{matrix}x_{1} \\ x_{2} \\ x_{3} \\ x_{4} \end{matrix} ) , A = ( \begin{matrix}1 & 0 & 1/2 & 0 \\ 0 & −1 & 0 & −3/2 \\ 1/2 & 0 & 4 & 0 \\ 0 & −3/2 & 0 & 1 \end{matrix} ) .

The trick in defining A is is to assign diagonal entries in A to corresponding square terms in the quadratic form, but to cross terms like −3x_{2}x_{4} assign two off–diagonal entries (e.g., assign −3/2 to symmetric entries a_{24} and a_{42} of A).

20a. (Quadratic Form in R^{3}) −x^{2} + xy + y^{2} − 4xz + 4yz + z^{2}

Solution to 20a. The quadratic −x^{2} + xy + y^{2} − 4xz + 4yz + z^{2} transforms to AX · X where

X = ( \begin{matrix}x \\ y \\ z \end{matrix} ) , A = ( \begin{matrix}−1 & 1/2 & −2 \\ 1/2 & 1 & 2 \\ −2 & 2 & 1 \end{matrix} ) .

Maple notes on 20–20a. To calculate the orthogonal matrix R (the rotation matrix) that transforms a quadratic form x^{t}Ax = c into its normal form X^{t}DX = c (D is a diagonal matrix), the algorithm for symmetric matrices is followed to create an orthogonal matrix Q of eigenvectors of A such that D = Q^{−1}AQ is the diagonal matrix of eigenvalues of A. Then R is the matrix Q of that algorithm and the normal form results by taking the change of variables X = Qx.

Example. Find the rotation matrix Q and the standard form for the quadratic 16x^{2} − 3xy + 4y^{2} = 10, using

maple.

Solution:

with(linalg):
k:=10:eq:= 16*x^2 - 3*x*y + 4*y^2=k;         # The problem
A:=matrix([[16,-3/2],[-3/2,4]]);
v:=[eigenvals(A)]; n:=coldim(A): J:=array(identity,1..n,1..n):
for i from 1 to n do
  w:=kernel(evalm(A-v[i]*J));
  y:=evalm(w[1]/sqrt(dotprod(w[1],w[1]))):
  y:=evalf(map(evalc,y),3):
  if i=1 then Q:=matrix(n,1,y): else
     Q:=augment(Q,matrix(n,1,y)): fi:
od:
X:=matrix(n,1,[X1,X2]):                 # New variables of standard form
eval(X)=evalf(eval(Q),3)*matrix(n,1,[x1,x2]);   # Rotation formulas
DD:=diag(seq(v[j],j=1..n));
FORM:=evalm(transpose(X) &* DD &* X);   # A 1 by 1 matrix
collect(FORM[1,1],[X1,X2])=k;           # Write in standard form
#                                  2              2
#                        eq := 16 x  - 3 x y + 4 y  = 10
#
#                                   [  16   -3/2 ]
#                              A := [            ]
#                                   [ -3/2    4  ]
#
#                                      1/2             1/2
#                     v := [10 + 3/2 17   , 10 - 3/2 17   ]
#
#                  [ X1 ]    [  .990    .119  ] [ x1 ]
#                  [    ]  = [                ] [    ]
#                  [ X2 ]    [ -.119    .990  ] [ x2 ]

#
#                         [            1/2                 ]
#                         [ 10 + 3/2 17            0       ]
#                    D := [                                ]
#                         [                            1/2 ]
#                         [        0        10 - 3/2 17    ]
#
#                            1/2    2               1/2    2
#                (10 + 3/2 17   ) X1  + (10 - 3/2 17   ) X2  = 10
#

Standard Form of a Quadratic. Write the quadratic in standard form λ_{1}X^{2} + λ_{2}Y^{2} = c and display both the rotation matrix R and the standard form.

21. (Quadratic Forms) 3x^{2} − 2xy = 5

Solution to 21. The normal form of 3x^{2} − 2xy = 5 is

(3/2 + \frac{\sqrt{13}}{2}) X1^{2} + (3/2 − \frac{\sqrt{13}}{2}) X2^{2} = 5, ( \begin{matrix}X1 \\ X2 \end{matrix} ) = ( \begin{matrix}0.96 & 0.29 \\ −0.29 & 0.96 \end{matrix} ) ( \begin{matrix}x \\ y \end{matrix} ) .

21a. (Quadratic Forms) x^{2} − 3xy + 4y^{2} = 1

Solution to 21a. The normal form of x^{2} − 3xy + 4y^{2} = 1 is

(5/2 + \frac{3 \sqrt{2}}{2}) X1^{2} + (5/2 − \frac{3 \sqrt{2}}{2}) X2^{2} = 1, ( \begin{matrix}X1 \\ X2 \end{matrix} ) = ( \begin{matrix}−0.380 & 0.923 \\ 0.926 & 0.383 \end{matrix} ) ( \begin{matrix}x \\ y \end{matrix} ) .

21b. (Quadratic Forms) 2x^{2} + xy + y^{2} = 4

Solution to 21b. The normal form of 2x^{2} + xy + y^{2} = 4 is

(3/2 + \frac{\sqrt{2}}{2}) X1^{2} + (3/2 − \frac{\sqrt{2}}{2}) X2^{2} = 4, ( \begin{matrix}X1 \\ X2 \end{matrix} ) = ( \begin{matrix}0.923 & −0.380 \\ 0.383 & 0.926 \end{matrix} ) ( \begin{matrix}x \\ y \end{matrix} ) .

22. (Linear Combinations) Compute the result of the linear combination 2u + v − 3w where

u = ( \begin{matrix}1 \\ 1 \\ −2 \end{matrix} ) , v = ( \begin{matrix}0 \\ 0 \\ 2 \end{matrix} ) , w = ( \begin{matrix}9 \\ 1 \\ −4 \end{matrix} ) .

Solution to 22. The result of the linear combination is

2u + v − 3w = 2 ( \begin{matrix}1 \\ 1 \\ −2 \end{matrix} ) + ( \begin{matrix}0 \\ 0 \\ 2 \end{matrix} ) − 3 ( \begin{matrix}9 \\ 1 \\ −4 \end{matrix} ) = ( \begin{matrix}−25 \\ −1 \\ 10 \end{matrix} ) .

22a. (Equality of Vectors) Let

u = ( \begin{matrix}1 \\ x \\ −2 \end{matrix} ) , v = ( \begin{matrix}x + 1 \\ 0 \\ 2 \end{matrix} ) , w = ( \begin{matrix}9 \\ 1 \\ −4x \end{matrix} )

The linear combination p = 2u + v − 3w depends upon x. Is there a value of x such that

p = ( \begin{matrix}−22.9 \\ −0.8 \\ 11.2 \end{matrix} )?

Solution to 22a. The linear combination p is given by

p = 2 ( \begin{matrix}1 \\ x \\ −2 \end{matrix} ) + ( \begin{matrix}x + 1 \\ 0 \\ 2 \end{matrix} ) − 3 ( \begin{matrix}9 \\ 1 \\ −4x \end{matrix} ) = ( \begin{matrix}x − 24 \\ 2x − 3 \\ 12x − 2 \end{matrix} ) .

There is a value of x such that

p = ( \begin{matrix}−22.9 \\ −0.8 \\ 11.2 \end{matrix} )

exactly when the components agree, i.e., x − 24 = −22.9, 2x − 3 = −0.8, 12x − 3 = 11.2. This happens for x = 1.1 (check all three equations!).

23. (Largest Linearly Independent Set) Extract from the list

( \begin{matrix}−1 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}−2 \\ 2 \\ 0 \end{matrix} ) , ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} ) , ( \begin{matrix}0 \\ 1 \\ 1 \end{matrix} )

a largest set of linearly independent vectors.

Solution to 23. To extract a largest linearly independent set of vectors from a list v_{1}, v_{2}, v_{3}, v4 requires an algorithm be followed.

The algorithm begins by choosing the set to be the single element v_{1}, already an independent set. Try to add v_{2} to the set. This will fail if v_{2} is a multiple of v_{1}. Then try to add v_{3} to the set. It will fail if v_{3} is a combination of vectors already in the set. Finally, try to add v_{4} to the set, which fails if v_{4} is a combination of vectors already in the set. When complete, the set is independent by construction and of largest size.

The largest independent set from the list

( \begin{matrix}−1 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}−2 \\ 2 \\ 0 \end{matrix} ) , ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} ) , ( \begin{matrix}0 \\ 1 \\ 1 \end{matrix} )

has size 2. The algorithm gives a basis

( \begin{matrix}−1 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}1 \\ 0 \\ 1 \end{matrix} ) .

An effective way to test independence of vectors is to find the RREF of the matrix with these vectors as columns. If the rank is the same as the number of columns, then the set is independent.

23a. (Vector Spaces) Extract from the list x, x − 1, 2x + 1, x^{2} − x, x^{2} + x a largest list of linearly independent functions.

Solution to 23a. The list x, x − 1, 2x + 1, x^{2} − x, x^{2} + x can be mapped to a list of column vectors

( \begin{matrix}0 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}−1 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}1 \\ 2 \\ 0 \end{matrix} ) , ( \begin{matrix}0 \\ −1 \\ 1 \end{matrix} ) , ( \begin{matrix}0 \\ 1 \\ 1 \end{matrix} )

where

( \begin{matrix}c_{1} \\ c_{2} \\ c_{3} \end{matrix} ) ↔ c_{1} + c_{2}x + c_{3}x^{2}.

Then the largest independent list if column vectors corresponds exactly to the largest set of independent polynomials. The RREF method gives the largest list as

( \begin{matrix}0 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}−1 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}0 \\ −1 \\ 1 \end{matrix} )

and therefore the largest list of independent polynomials is x, x − 1, x^{2} − x (the size is 3, there are many independent lists of size 3).

24. (Basis for a Subspace) Find a basis for the set of vectors v⃗ = ( \begin{matrix}x \\ y \\ z \end{matrix} ) in R^{3} that satisfy the equation

5x + 6y − 2z = 0.

Solution to 24a. To find a basis for the set of vectors X = ( \begin{matrix}x \\ y \\ z \end{matrix} ) in R^{3} that satisfy the equation

5x + 6y − 2z = 0, find the RREF of the matrix A given above and write out the complete solution X of the linear system AX = 0:

X = ( \begin{matrix}x \\ y \\ z \end{matrix} ) = ( \begin{matrix}(−6/5)y + (2/5)z \\ y \\ z \end{matrix} ) = y ( \begin{matrix}−6/5 \\ 1 \\ 0 \end{matrix} ) + z ( \begin{matrix}2/5 \\ 0 \\ 1 \end{matrix} ) .

A basis can be read off the standard form of the solution X:

( \begin{matrix}−6/5 \\ 1 \\ 0 \end{matrix} ) , ( \begin{matrix}2/5 \\ 0 \\ 1 \end{matrix} ) .

24a. (Subspace Criterion) Show that the set of vectors \overrightarrow{v} = ( \begin{matrix}x \\ y \\ z \end{matrix} ) in R^{3} that satisfy the equation 5x + 6y −

2z = 0 is a subspace of R^{3}.

Solution to 24. To prove a set is a subspace of R^{3} it suffices to establish the conditions in the Subspace Criterion:

(a) If X and Y are in the set, then so is X + Y.

(b) If X is in the set and k is a constant, then kX is in the set.

A set already known to be a subspace of R^{3} has a basis of one, two or three elements (unless the set is the origin). A plane given by an equation ax + by + cz = 0 represents a subspace with basis of two elements, because two independent vectors determine a plane. A line through the origin given by a vector equation

( \begin{matrix}x \\ y \\ z \end{matrix} ) = t ( \begin{matrix}v_{1} \\ v_{2} \\ v_{3} \end{matrix} )

is a subspace with a basis of one element.

To show that the set of vectors X = ( \begin{matrix}x \\ y \\ z \end{matrix} ) in R^{3} that satisfy the equation 5x + 6y − 2z = 0 is a

subspace of R^{3}, write the equation as a matrix equation AX = 0 where

A = ( 5 6 −2 ) .

It is routine to check (a) and (b) for the equation AX = 0. For example, to check (a), let AX = 0 and BY = 0, then A(X + Y) = AX + AY = 0 + 0 = 0, so X + Y is in the set. Item (b) is similar.

24b. (Vector Space Basis) Find a basis for the solution space of the linear differential equation y′′′ − 6y′′ + 11y′ − 6y = 0.

Solution to 24b. A basis for the solution space of a homogeneous linear differential equation can be extracted from the General Solution of the equation. The basis is obtained formally from the general solution by identifying the functions multiplying the arbitrary constants in the general solution.

From the general solution

y(x) = C_{1} exp(x) + C_{2} exp(−3x) + C_{3} exp(−2x)

we can infer that exp(x), exp(−3x), exp(−2x) is a basis for the solution space of the differential equation y′′′ + 4y′′ + y′ − 6y = 0.

A basis for the solution space of the linear differential equation y′′′ − 6y′′ + 11y′ − 6y = 0 is

e^{x}, e^{2x}, e^{3x}.

Maple Notes on Differential Equations. The general solution of a differential equation can be found by generalizing this example:

u:=y(x): u1:=diff(y(x),x):
u2:=diff(y(x),x,x): u3:=diff(y(x),x,x,x):
de:=u3+4*u2+u1-6*u = 0:
dsolve(de,y(x));
#              y(x) = _C1 exp(x) + _C2 exp(- 3 x) + _C3 exp(- 2 x)

Shadow Projection and Dot Product. Let

u = ( \begin{matrix}t \\ e^{t} \\ e^{2t} \end{matrix} ) , v = ( \begin{matrix}t + 1 \\ e^{t−1} \\ e^{1−t} \end{matrix} )

and let t = 0.6. Compute the following answers and display the result in 3-digit accuracy.

25. (Vector Projection) The vector projection of u onto the direction of v, Proj_{v}(u).

Solution to 25. The vector projection of u onto the direction of v is

Proj_{v}(u) = ( \begin{matrix}2.2 \\ 0.9 \\ 2.0 \end{matrix} ) .

The intent of this problem is to examine various situations where the idea of shadow projection is useful.

Maple notes on vector algebra. The maple commands vector, evalm, norm can be used. Here is an example:

with(linalg):
u:=vector([1,x,-2]): v:=vector([x+1,0,2]): w:=vector([9,1,-4*x]):
dotprod(u,v);
#                                     x - 3
p:=evalm(2*u-v+3*w);
#                    p := [ 28 - x, 2 x + 3, - 6 - 12 x ]
q:=subs(x=2.1,eval(p));
#                              [ 25.9, 7.2, -31.2 ]
norm(q,2);
#                                  41.18361325
sqrt(q[1]^2+q[2]^2+q[3]^2);
#                                  41.18361325
sqrt(dotprod(q,q));
#                                  41.18361325

It is remarked that norm(q,2) stands for the Euclidean norm of the vector q, whereas norm(q) is the maximum norm. The components of vector q are q[1], q[2], q[3]. Some basic formulas:

Math Formula Maple Formula

Projb⃗(a⃗) = \frac{a⃗ · b⃗}{b⃗ · b⃗}b⃗ p:=evalm((dotprod(a,b)/dotprod(b,b))*b)

a⃗ · b⃗ = |a⃗||b⃗| cos(θ) theta:=arccos(dotprod(a,b)/(norm(a,2)*norm(b,2)))

25a. (Altitudes of a Triangle) The three altitudes of the triangle determined by u and v.

Solution to 25a. The three altitudes of the triangle determined by u and v are approximately 1.33, 2.23 and 2.14.

26. (Angle between Vectors) The acute angle between u and v.

Solution to 26. The acute angle between u and v is 35.6 degrees.

26a. (Angles of a Parallelogram) All angles in the parallelogram determined by u and v.

Solution to 26a. The angles in the parallelogram determined by u and v are 35.6 and 144.4 degrees.

26b. (Angle in a Triangle) A triangle in R^{2} has vertices P = (3, −1), Q = (4, 5) and R = (−1, −2). Find the cosine of the angle θ at the vertex P.

Solution to 26b. The cosine of the angle θ = 113.5^{∘} is −0.3987.

A maple example:

with(linalg):
# Find cosine of the angle at vertex P in a triangle
P:=vector([1,4]): Q:=vector([3,7]): R:=vector([2,12]):
a:=evalm(R-P): b:=evalm(Q-P):
ans:=evalf(dotprod(a,b)/(norm(a,2)*norm(b,2)));

Cross Product and Scalar Triple Product. Let

u = ( \begin{matrix}t^{2} \\ e^{t} \\ e^{−t} \end{matrix} ) , v = ( \begin{matrix}t \\ e^{2t} \\ e^{−2t} \end{matrix} ) , w = ( \begin{matrix}1 \\ −1 \\ 0 \end{matrix} )

and let t = 0.5. Compute the following answers and display the result in 3-digit accuracy.

27. (Area) The area of the parallelogram determined by u and v.

Solution to 27. The area of the parallelogram determined by u and v is 1.07.

A maple example:

with(linalg):
u:=vector([t^2,exp(t),t*exp(t)]): v:=vector([t,exp(t),exp(-t)]):
w:=vector([1,1,-1]): t:=0.55:
area:=norm(crossprod(u,v),2);
#                              area := .8554853324

27a. (Volume) The volume of the parallelepiped determined by u, v, w.

Solution to 27a. The volume of the parallelepiped determined by u, v, w is 1.25.

A maple example:

with(linalg):
u:=vector([t^2,exp(t),t*exp(t)]): v:=vector([t,exp(t),exp(-t)]):
w:=vector([1,1,-1]): t:=0.55:
volume:=abs(dotprod(crossprod(u,v),w));
#                             volume := .1264705293

28. (Cross Product) The cross product of u × w and v × w.

Solution to 28. The cross product of u × w and v × w is

(u × w) × (v × w) = ( \begin{matrix}−1.25 \\ 1.25 \\ 0.00 \end{matrix} ) .

28a. (Cross Product Magnitude) The magnitude of the cross product of the diagonals of the parallelogram determined by u and v.

Solution to 28a. The magnitude of the cross product of the diagonals is 2.145.

29. (Near Point) Find the point R on the line L through P = (1, −4, 6) and Q = (3, 1, 2) that is closest to the origin.

Solution to 29. The point R on the line L through P = (1, −4, 6) and Q = (3, 1, 2) that is closest to the origin is R = (2.87, 0.67, 2.27). It is found from R · T = 0 where T is tangent to the line. Since R = P + tT for some t, it follows that R = P − Proj_{T} (P).

30. (Equation of a Plane) Find the equation of the plane passing through the three points P = (t, t^{2}, t^{3}), Q = (t sin(t), t cos(t), t^{2}), R = (sin(t), cos(t), t) where t = 0.886.

Solution to 30. The equation of the plane passing through the three points P = (t, t^{2}, t^{3}), Q = (t sin(t), t cos(t), t^{2}), R = (sin(t), cos(t), t) where t = 0.886 is

0.256x − 0.246y − 0.0476z = 0.

The tricky part of this problem is to observe that the origin is in the plane, therefore the cross product of P and R is a normal N to the plane, whose equation must be N · X = 0. There are other ways to do the problem, giving equivalent answers.

Maple produces varying answers containing powers 10^{−10}, which for practical purposes are zero terms. A maple example:

with(linalg):
# Plane equation given three points P, Q, R
P:=vector([1,0,1]): Q:=vector([1,1,-2]): R:=vector([0,1,1]):
dotprod(evalm(vector([x,y,z])-P),crossprod(evalm(Q-P),evalm(R-P)))=0;

The idea of this example can be carried out for the present problem, however, beware of stuffing in the value of t too early in the computation.

30a. (Intersection of Planes) Find an algebraic description of the intersection of the two planes 3x−y +4z = 3 and −4x − 2y + 7z = 8. Plot the two planes on one set of axes and show the intersection set.

Solution to 30a. The planes 3x − y + 4z = 3 and −4x − 2y + 7z = 8 intersect along a line whose direction is T = (1, −37, −10). A point in the intersection set is P = (0, −11, −2). The parametric form of the line of intersection is X = P + tT.

One mystery is how to find P. Solve the mystery by solving for x, y, z in the set of two equations in three unknowns. This is an RREF problem for the augmented matrix.

Another mystery is how to find T. Solve this one with the cross product of the normals to the two planes.

The cross product of the normals is a vector whose direction is the intersection of the planes.

A maple example:

with(linalg):
# Find the equation of intersection for planes x+y-z=1 and x+2y-4z=2
# Solving simultaneously, y-3z=1, so x=0,z=0,y=1 is in both planes.
n1:=vector([1,1,-1]): n2:=vector([1,2,-4]): # Normals to the planes
v:=crossprod(n1,n2):
vector([x,y,z]) = evalm(vector([0,1,0]) + t*v); # Line equation parametric form
#                    [ x, y, z ] = [ - 2 t, 1 + 3 t, t ]

A maple plotting example.

with(linalg):
# Plot planes 3x-y+z=4 and 2x+y+3z=1 on same axes, show intersection
plot3d({4-3*x+y,(1-3*x-y)/3},x=0..10,y=0..10);

31. (Angle between Planes) Find the angle in degrees between the two planes 3x − y + 4z = 3 and −4x − 2y + 7z = 8. Solution to 31. The angle in degrees between the two planes 3x − y + 4z = 3 and −4x − 2y + 7z = 8 is 64.9. Use the angle between the normals to the two planes. The angle between two planes is not uniquely determined because the angle could be either obtuse or acute. It is for this reason that the angle between two planes is often taken to be the acute angle between the normals.

Some maple examples:

with(linalg):
# Find the angle in radians between x+y-z=1 and x+2y-4z=2
n1:=vector([1,1,-1]): n2:=vector([1,2,-4]): # Normals to the planes
theta:=evalf(arccos(dotprod(n1,n2)/(norm(n1,2)*norm(n2,2))));
#                              theta := .4908826781

32. (Parametric form of a Line) Use vector methods to find a parametric representation of the line that passes through the point (3, 4, 7) and is parallel to the line of intersection of the planes defined by the equations x + 2y + 11z = 0 and 5x + 11y + 58z = 0. Solution to 32. The parametric representation of the line that passes through the point (3, 4, 7) and is parallel to the line of intersection of the planes defined by the equations x + 2y + 11z = 0 and 5x + 11y + 58z = 0 is

X = ( \begin{matrix}3 \\ 4 \\ 7 \end{matrix} ) + (−t) ( \begin{matrix}5 \\ 3 \\ −1 \end{matrix} ) .

33. (Circular Helix Tangents and Normals) Sketch the circular helix f(t) = ( \begin{matrix}cos 2t \\ sin 2t \\ t \end{matrix} ) for 0 ≤ t ≤ 4π and

draw on the curve at t = π/4 the tangent and normal vectors to the curve.

Solution to 37. The circular helix f(t) = ( \begin{matrix}cos 2t \\ sin 2t \\ t \end{matrix} ) for 0 ≤ t ≤ 4π is a space curve on the cylinder

x^{2} + y^{2} = 1. The z-component is z = t which moves at speed 1. The curve wraps around the cylinder like a coil spring. The tangent vector points in the direction of the curve. The normal points to the center of the circle of curvature.

34. (Unit Tangent and Acceleration) Compute the unit tangent vector and the (non-unit) acceleration vector at t = 1 for the vector function

f(t) = ( \begin{matrix}t \\ t^{2} \\ t^{3} \\ sin πt \\ cos πt \end{matrix} ) .

Solution to 38. The unit tangent vector and the (non-unit) acceleration vector at t = 1 for the vector function

f(t) = ( \begin{matrix}t \\ t^{2} \\ t^{3} \\ sin πt \\ cos πt \end{matrix} )

are obtained by calculations that parallel 3D and 2D methods: find vectors f′(1)/|f′(1)| and f′′(1). The answers:

\frac{f′(1)}{|f′(1)|} = \frac{1}{\sqrt{14 + π^{2}}} ( \begin{matrix}1 \\ 2 \\ 3 \\ −π \\ 0 \end{matrix} ) , f′′(1) = ( \begin{matrix}0 \\ 2 \\ 6 \\ 0 \\ π^{2} \end{matrix} )

For comparison, \sqrt{14 + π^{2}} = 4.89.

Maple notes on 34. Vector notation from maple’s linalg package is assumed. The position, velocity and acceleration vectors can be directly computed in symbolic form. Here is an example:

with(linalg):
f:= t -> vector([cos(t),sin(t),t^2]):
v:= t -> map(diff,f(t),t):
a:= t -> map(diff,f(t),t,t):
f(t);
#                                                2
#                             [ cos(t), sin(t), t  ]
v(t);
#                           [ - sin(t), cos(t), 2 t ]
a(t);
#                           [ - cos(t), - sin(t), 2 ]

35. (Arc Length) Compute the arc length on [0, 2] for

f(t) = ( \begin{matrix}2t^{3}/3 \\ 1 + t^{4.5} \\ 1 − t^{4.5} \end{matrix} ) .

Solution to 39. Arc length is computed from ∫_{a}^{b} |f′(t)|dt. The answer:

∫_{0}^{2} \sqrt{4t^{4} + 4.5^{2}t^{7} + 4.5^{2}t^{7}}dt = 32.55.

The secret seems to be factoring t^{4} out of the square root and then making a change of variable in the integral.

36. (Curvature and Radius of Curvature) Find the curvature and radius of curvature for

f(t) = ( \begin{matrix}3 sin t \\ 4 cos t \end{matrix} ) .

Solution to 40. There are separate formulas for the curvature in space dimensions 2 and 3. This one uses the planar formula:

κ = \frac{|x′y′′ − x′′y′|}{|x^{′2} + y^{′2}|^{3/2}}, x = 3 sin t, y = 4 cos t.

The answer:

R = \frac{1}{κ} = \frac{1}{12} (16 − 7 cos^{2}(t))^{3/2} = \frac{1}{12} (9 + 7 sin^{2} t)^{3/2} .

36a. (Circle of Curvature) Sketch the circle of curvature for y = ln cos x at x = π/4.

Solution to 40a. To sketch the circle of curvature it is necessary to compute its radius R = 1/κ and the center of the circle of curvature, whose location has the form r⃗ + Rn⃗ where r⃗ is position and n⃗ is the standard normal vector.

The curve y = ln cos x at x = π/4 has curvature κ = 1/\sqrt{2}, obtained by the special 2D formula. Also, r⃗ = (π/4, − log 2/2) and n⃗ = (−1/\sqrt{2}, −1/\sqrt{2}). The center of the circle of curvature is

C = (\frac{π}{4} − 1, − \frac{1}{2} log 2 − 1) .

Use maple to produce the curve plot and then sketch the circle of curvature by hand.

36b. (Curvature and Torsion) For the space curve f(t) = ( \begin{matrix}a cos t \\ a sin t \\ bt \end{matrix} ), where a > 0, calculate the the curvature

κ and the torsion τ.

Solution to 40b. For the space curve f(t) = ( \begin{matrix}a cos t \\ a sin t \\ bt \end{matrix} ), where a > 0, calculate the the curvature κ

and the torsion τ. Some calculations:

T = \frac{1}{\sqrt{a^{2} + b^{2}}} ( \begin{matrix}−a sin t \\ a cos t \\ b \end{matrix} ) , N = ( \begin{matrix}− cos t \\ − sin t \\ 0 \end{matrix} ) , f′(t) × f′′(t) = ( \begin{matrix}ab sin t \\ −ab cos t \\ a^{2} \end{matrix} ) .

The curvature is κ = a/(a^{2} + b^{2}) and the torsion is τ = b/(a^{2} + b^{2}).

Maple notes on 36b. The plotting of space curves in maple will be illustrated in the example below. The problem is to plot a circular helix space curve.

with(plots):
spacecurve([cos(t),sin(t),t],t=0..4*Pi);

37. (Unit Normal and Unit Binormal) Find the unit normal and unit binormal at t = 0 for the vector function

f(t) = ( \begin{matrix}1 \\ t \\ t^{2} \end{matrix} ) .

Solution to 41. The unit normal N and unit binormal B at t = 0 for the vector function

f(t) = ( \begin{matrix}1 \\ t \\ t^{2} \end{matrix} )

are

N = ( \begin{matrix}0 \\ 0 \\ 1 \end{matrix} ) , B = ( \begin{matrix}1 \\ 0 \\ 0 \end{matrix} ) .

The unit normal is calculated by differentiation of the formula for the unit tangent followed by division to make it a unit vector. Don’t try to apply general formulas: it is the process you are trying to learn; this is not a memorization project!

37a. (Binormal) Given a > 0, calculate the unit binormal vector B for the space curve f(t) = ( \begin{matrix}a cos t \\ a sin t \\ bt \end{matrix} ).

Solution to 41a. The calculations were done above in connection with the curvature and torsion for this curve. The unit binormal vector B is

B = \frac{1}{\sqrt{a^{2} + b^{2}}} ( \begin{matrix}b sin t \\ −b cos t \\ a \end{matrix} ) .

38. (Kinematics) Compute the velocity, speed, acceleration at t = π/4 for the space curve

f(t) = ( \begin{matrix}cos t \\ sin t \\ t^{5} \end{matrix} ) .

Solution to 42. The speed, velocity and acceleration at t = π/4 for the space curve

f(t) = ( \begin{matrix}cos t \\ sin t \\ t^{5} \end{matrix} )

are

v = 2.15, v = ( \begin{matrix}−1/\sqrt{2} \\ 1/\sqrt{2} \\ 1.9 \end{matrix} ) , a = ( \begin{matrix}−1/\sqrt{2} \\ −1/\sqrt{2} \\ 9.69 \end{matrix} ) .

38a. (Kinematics) An airplane in level flight at 600mph releases a bomb at 30000 feet. At what speed and elapsed time does the bomb hit the ground?

Solution to 42a. The speed of the airplane does affect the answer. The time is 43.2 seconds, the speed of impact is 1389.4 feet per second.

38b. (Kinematics) For the plane trajectory

f(t) = ( \begin{matrix}A(t cos t − sin t) \\ A(t sin t + cos t) \end{matrix} ) , A > 0,

calculate the velocity vector v⃗, the speed v, and the acceleration vector a⃗.

Solution to 42b. For the plane trajectory

f(t) = ( \begin{matrix}A(t cos t − sin t) \\ A(t sin t + cos t) \end{matrix} ) , A > 0,

the velocity is and acceleration are

v⃗ = f′(t) = A ( \begin{matrix}−t sin t \\ t cos t \end{matrix} ) , a⃗ = f′′(t) = A ( \begin{matrix}− sin t − t cos t \\ cos t − t sin t \end{matrix} ) .

The speed is v = |f′(t)| = At.

39. (Tangential and Normal Components) For the plane trajectory

f(t) = ( \begin{matrix}A(t cos t − sin t) \\ A(t sin t + cos t) \end{matrix} ) , A > 0,

calculate the tangential component of the acceleration a_{T} and the normal component of the acceleration a_{N}.

Solution to 43. The previous problem did most of the computations. The tangential component is a_{T} = T · a. The normal component a_{N} is obtained from a = a_{T} T + a_{N}N by solving for a_{N} in the identity |a|^{2} = a_{T}^{2} + a_{N}^{2}. The answers: a_{T} = A, a_{N} = A|t|.

40. (Level Curve Sketch Sketch the level curves of z = 2x^{2} + 3y^{2} for z = 1, 2, 4, 10.

Solution to 33. The project is to sketch the ellipses 2x^{2} + 3y^{2} = 1, 2x^{2} + 3y^{2} = 2, 2x^{2} + 3y^{2} = 4, 2x^{2} + 3y^{2} = 10. All have center at the origin and they are concentric. This is best done by hand.

40a. (Sketch Curves of Constant Voltage) Sketch the curves of constant voltage v for v = 1, 0.75, 0.5, 0.25,

0.125:

v = \sqrt{1 − 4x^{2} − 9y^{2}}.

Solution to 33a. The curves of constant voltage v are the concentric ellipses 4x^{2} + 9y^{2} = 1 − 1, 4x^{2} + 9y^{2} = 1 − 0.75^{2}, 4x^{2} + 9y^{2} = 1 − 0.5^{2}, 4x^{2} + 9y^{2} = 1 − 0.25^{2}, 4x^{2} + 9y^{2} = 1 − 0.125^{2}. All have center at the origin. Best done by hand.

40b. (Domain and Level Curves) Find the domain and range of f(x, y, z) = xy/z and plot the level surface f(x, y, z) = 1.

Solution to 33b. The domain of f(x, y, z) = xy/z is all (x, y, z) with z ≠ 0. The range is all of R^{1}. A plot of the level surface f(x, y, z) = 1 is the surface plot z = xy, which is done in maple with the

command plot3d(x*y,x=-10..10,y=-10..10).

General surfaces are plotted in maple by similar methods using the command plot3d. Here is an example:

plot3d(sin(x*y),x=-Pi..Pi,y=-Pi..Pi,style=PATCH);

A distinguishing feature of this example is that z does not appear as a variable in the plot command! It is a common mistake to write the mathematical equation into the maple plot command. This error results in the plot command dealing with variables x, y, z: no plot structure is generated and no plot appears. No error messages are emitted, however, so you can’t tell there is a mistake! The idea of using the variable z is as follows:

z:= sin(x*y):
plot3d(z,x=-Pi..Pi,y=-Pi..Pi,style=PATCH);

The unix mouse and dialog box interface allows printing the figure to a postscript file. The postscript file is sent to the laser printer with the command print -p plotoutput (in a terminal window). For most purposes, a screen print or hand copy will suffice.

41. (Computer Plot of a Surface) Plot by computer z = (2x^{2} + 3y^{2})e^{1−x^{2}−y^{2}}. Part of the problem is to determine the optimum plot domain.

Solution to 34. A maple computer plot is done with

                  plot3d((2*x^2+3*y^2)*exp(1-x^2-y^2),x=a..b,y=c..d)

where a, b, c, d are adjusted to make the plot domain correct. The idea behind choosing the values is the observation that e^{x} is zero for plotting purposes when x is very negative.

42. (Gradient Field Magnitude) Compute the gradient field of z = y tan(y − x) and determine its magnitude along the line y = x.

Solution to 35. The magnitude of the gradient field is the vector norm of the gradient vector. Along y = x the vector simplifies and effectively depends only upon x.

The gradient field of z = y tan(y − x) is

∇(z) = ( \frac{∂z}{∂x} ; \frac{∂z}{∂y} ) = ( \begin{matrix}−y sec^{2}(y − x) \\ tan(y − x) + y sec^{2}(y − x) \end{matrix} ) .

Its value along the line y = x is

∇(z) = ( \begin{matrix}−y sec^{2}(0) \\ tan(0) + y sec^{2}(0) \end{matrix} ) .

Since sec(0) = 1 and tan(0) = 0, the above can be simplified to give magnitude |y|\sqrt{2} (or |x|\sqrt{2}).

43. (Limits of Vector Functions) Compute

lim_{t→1} f(t), lim_{t→1} g(t)

for the vector functions

f(t) = ( e^{1−t}^{\frac{sin(t−1)}{t−1}} ) , g(t) = ( \begin{matrix}tan(\frac{1}{t}) \\ t \\ t^{2} \\ t^{3} \end{matrix} ) .

Solution to 36. Limits of vector quantities are taken by component: each 3D vector limit problem is in disguise three normal limit problems from calculus.

The answers:

lim_{t→1} f(t) = ( \begin{matrix}1 \\ 1 \end{matrix} ) , lim_{t→1} g(t) = ( \begin{matrix}tan 1 \\ 1 \\ 1 \\ 1 \end{matrix} ) .

44. (Directional Derivative) Compute the directional derivative of f(x, y, z) = xe^{y} − ye^{z} + xyz at (0, 0, 1) in

direction ( \begin{matrix}1 \\ 1 \\ −3 \end{matrix} ).

Solution to 44. The directional derivative is \frac{1 − e}{\sqrt{11}}.

44a. (Continuity of Partials) Let f(x, y) = (x^{2} + y^{2}) sin(1/\sqrt{x^{2} + y^{2}}) except at the origin, where f(0, 0) = 0. Show that f is differentiable but the partials are not continuous at x = 0, y = 0.

Solution to 44a. This “proof” is constructed by computing the partial derivatives of f(x, y) = (x^{2} + y^{2}) sin(1/\sqrt{x^{2} + y^{2}}) at all x, y, and then in particular at x = y = 0. All calculations are successful, but continuity fails at x = y = 0. Some steps:

f_{x}(x, y) = 2 x sin(\frac{1}{\sqrt{x^{2} + y^{2}}} ) − \frac{cos(\frac{1}{\sqrt{x^{2}+y^{2}}} )x}{\sqrt{x^{2} + y^{2}}}, f_{y}(x, y) = 2 y sin(\frac{1}{\sqrt{x^{2} + y^{2}}} ) − \frac{cos(\frac{1}{\sqrt{x^{2}+y^{2}}} )y}{\sqrt{x^{2} + y^{2}}} .

The derivatives at x = y = 0 are found as follows:

lim_{h→0} \frac{f(h, 0)}{h} = lim_{h→0} h sin(\frac{1}{|h|}) = 0, lim_{k→0} \frac{f(0, k)}{k} = lim_{k→0} k sin(\frac{1}{|k|}) = 0.

The lack of continuity is verified by taking the limit along different paths approaching the origin.

45. (Direction of Maximum Temperature Increase) The temperature T = 50 − x^{2} − y^{2} on a plate increases

most rapidly in some direction ( \begin{matrix}a \\ b \end{matrix} ), at the point x = 1, y = 0. Find the direction.

Solution to 45. The gradient of T points in the direction of maximum increase of T. The answer:

( \begin{matrix}−2 \\ 0 \end{matrix} ).

45a. (Maximum Temperature) Find the hottest point on or inside a solid with shape x^{2} + y^{2} + z^{2} ≤ 1 having temperature distribution T = 1000 exp(−x^{2} − y^{2} − z^{2} − 10).

Solution to 45a. The hottest point is at x = y = z = 0, because T is smaller at other points, due to the form of the exponential term.

46. (Partials) Let

\begin{aligned}w & = & x^{2} − y^{2}, \\ x & = & u^{2} − v^{2}, \\ y & = & 2uv. \end{aligned}

Use the chain rule to calculate ∂w/∂u and ∂w/∂v. Check your answers by writing w as a function of u and v.

Solution to 46. The answers: 4u^{3} − 12uv^{2} and 4v^{3} − 12vu^{2}.

Maple notes on 46. Partial derivatives and gradients are computed with maple as in the example below. A gradient is computed at a given point. The symbolic value of the gradient below is z(s,t), which is too complicated to print here.

with(linalg):
w:=x^2*y^2 - x*y; x:=u^2+v^2; y:=u-v;
z:= (s,t) -> subs({u=s,v=t},vector([diff(w,u),diff(w,v)]));
#
#                                                       d       d
#           z := (s,t) -> subs({u = s, v = t}, vector([---- w, ---- w]))
#                                                       du      dv
z(1,0);
#                                    [3, -1]
z(2,3);
#                                  [-243]

47. (Tangent Plane and Normal Line) Find the tangent plane equation and the normal line equations for x^{2} − y^{2} + z^{2} = 1 at x = 1, y = 2, z = 2.

Solution to 47. Find the tangent plane equation and the normal line equations The surface x^{2} − y^{2} + z^{2} = 1 is a level surface of F = x^{2} − y^{2} + z^{2} − 1, therefore ∇(F) is a normal to the surface. At x = 1,

y = 2, z = 2, ∇(F) = ( \begin{matrix}2 \\ −4 \\ 4 \end{matrix} ). The tangent plane equation is 2(x − 1) − 4(y − 2) + 4(z − 2) = 0. The

normal line is given by

X = ( \begin{matrix}1 \\ 2 \\ 2 \end{matrix} ) + t ( \begin{matrix}2 \\ −4 \\ 4 \end{matrix} ) .

47a. (Tangent Plane and Normal Line) Find the tangent plane equation and the normal line equations for z = arctan(y/x) at x = −4, y = 4.

Solution to 47a. The normal line equation is given by the point of application and the direction of the normal to the tangent plane, i.e., the gradient of the surface at the given point. The line equation has three possible forms. When not specified, choose the vector form r⃗ = P⃗ + tv⃗.

The plane equation can be given in several forms. The preferred form is

a(x − x_{0}) + b(y − y_{0}) + c(z − z_{0}) = 0

where (x, y, z) is any point in the plane, (x_{0}, y_{0}, z_{0}) is a fixed point in the plane and the normal to the plane is (a, b, c).

The answers:

X = ( \begin{matrix}−4 \\ 4 \\ −π/4 \end{matrix} ) + (−t) ( \begin{matrix}1/8 \\ 1/8 \\ 1 \end{matrix} ) , \frac{1}{8}(x + 4) + \frac{1}{8}(y − 4) + (z + \frac{π}{4} ) = 0.

47b. (Tangent Plane and Symmetric Normal Line Equation) For the surface defined by the equation 2x −

sin(xyz) = 2 find an equation for the tangent plane, and symmetric equations for the normal line, at the point (1, π, 1).

Solution to 47b. The symmetric form of a line is \frac{x−x_{0}}{a} = \frac{y−y_{0}}{b} = \frac{z−z_{0}}{c} where v⃗ = (a, b, c) is the line direction and P⃗ = (x_{0}, y_{0}, z_{0}) is the given point of application.

The answers:

\frac{x − 1}{2 + π} = \frac{y − π}{1} = \frac{z − 1}{π}, (2 + π)(x − 1) + (1)(y − π) + π(z − 1) = 0.

48. (Line Integral) Evaluate ∫_{C} F (x) · dx where x = (x_{1}, x_{2}), F (x) = ( \begin{matrix}x_{1}^{2} − 4 \\ x_{2}^{2} − x_{1} \end{matrix} ) and C is the upper half

of the ellipse with center at the origin and semiaxes a = 4, b = 2.

Solution to 48. The real work in line integrals is to write the curve in parametric form. This task usually dominates the solution time. Each line integral is normally one or more ordinary calculus integrals.

An ellipse with semiaxes a and b and center (0, 0) can be written as x^{2}/a^{2}+y^{2}/b^{2} = 1 which in parametric form is x = a cos(t), y = b sin(t). The upper half uses 0 ≤ t ≤ π while the lower half uses π ≤ t ≤ 2π.

Use notation x = (x, y). The ellipse can be parameterized by the equations x = 4 cos t, y = 2 sin t, 0 ≤ t ≤ π. Then

F (x)dx = −64 cos^{2} t sin t + 16 sin t + 8 sin^{2} t cos t − 8 cos^{2} t.

Integrating over [0, π] gives the answer −\frac{32}{3} − 4π. This is the correct answer for parameterization counterclockwise. For the wrong parameterization (clockwise), the answer is the negative of this one.

Maple notes on 48. Line integrals are computed in maple by reduction to an ordinary integral with limits. Here is an example of a clever syntax for handling the problem of line integrals: Example: Evaluate ∮_{C} Mdx + Ndy where M = xy, N = 2x^{2}y and C is the curve x = t^{2}, y = 2t from t = 0 to t = 2.

M:=x*y: N:=2*y*(x^2): x:=t^2: y:=2*t: a:=0: b:=2:
dx:=diff(x,t): dy:=diff(y,t): f:=M*dx+N*dy:
int(f,t=a..b);
# answer: 1664/16

48a. (Line Integrals) Calculate the work done by the force F = ( \begin{matrix}2xy \\ 2y \end{matrix} ) when a particle moves counterclock-

wise around the triangle with vertices (0, 0), (0, 1) and (1, 0).

Solution to 48a. A triangle can be parameterized by the method of segments. This is because the triangle is the union of three line segments. Each line segment has vertices P and Q with a direction taken from P to Q. The parameterization method is to write any (x, y) on the segment as (x, y) = P +t(Q−P), 0 ≤ t ≤ 1. This method applies easily to polygonal figures and has the advantage that ordinary integrals arising in the problem always have limits of integration t = 0 to t = 1.

The curve C = C_{1} +C_{2} +C_{3}, where C_{1}, C_{2}, C_{3} are the line segments making up the edges of the triangle. The first one is x = t, y = 0, 0 ≤ t ≤ 1. Then

F (x)dx = ( \begin{matrix}2t(0) \\ 2(0) \end{matrix} ) · ( \begin{matrix}dt \\ 0 \end{matrix} ) = 0, ∫_{0}^{1} F (x)dx = 0.

Similarly, the other two integrals are 2/3 and −1. So the total answer for the work is −1/3.

A general method emerges for parameterizing a line segment with endpoints P (the tail) and Q (the head). The formula is X = P + t(Q − P), 0 ≤≤ 1. It was applied here to each of the three line segments making up the edge of the triangle. This method is called the head minus tail rule.

49. (Line Integral) Consider the line integral

∫_{C}(3x^{2}e^{y} dx + x^{3}e^{y} dy),

where C is the broken line curve from (0, 0) to (1, 0) to (1, 1). Evaluate it directly from the definition.

Solution to 49. We are to compute directly the line integral ∫_{C}(3x^{2}e^{y} dx + x^{3}e^{y} dy).

If C is the broken line curve from (0, 0) to (1, 0) to (1, 1), then C consists of two line segments C_{1} and C_{2}, which can be parameterized by the head minus tail rule.

On the first one, ( \begin{matrix}x \\ y \end{matrix} ) = ( \begin{matrix}0 \\ 0 \end{matrix} ) + t ( \begin{matrix}1 \\ 0 \end{matrix} ), so x = t, y = 0, 0 ≤ t ≤ 1. Then

F (x)dx = ( \begin{matrix}3t^{2} \\ t^{3} \end{matrix} ) · ( \begin{matrix}dt \\ 0 \end{matrix} ) = 3t^{2}dt, ∫_{0}^{1} F (x)dx = 1.

The other one is e − 1, so the total is e, the value of the line integral.

50. (Conservative Field) Given

F = ( \begin{matrix}tan^{2} x − y/(x^{2} + y^{2}) \\ x/(x^{2} + y^{2}) − e^{y} \end{matrix} ) ,

show that ∇f = F has solution

f = tan x − x + arctan(y/x) − e^{y}

and determine all possible solutions f.

Solution to 50. Given F = (tan^{2} x − y/(x^{2} + y^{2}), x/(x^{2} + y^{2}) − e^{y}), show that ∇f = F has solution f = tan x − x + arctan(y/x) − e^{y} and determine all possible solutions f.

The first part of the solution verifies the formula ∇f = F. It is done by expanding the left side:

∇f = ( \begin{matrix}f_{x} \\ f_{y} \end{matrix} ) = ( \begin{matrix}sec^{2} x − 1 − (y/x^{2})/(1 + (y/x)^{2}) \\ (1/x)/(1 + (y/x)^{2}) − e^{y} \end{matrix} ) .

After clearing fractions, it is clear that ∇f = F. The second part of the solution show that any solution of ∇g = F must satisfy g = f + c for some constant c. The idea is to write the vector equation ∇g = F as two equations

g_{x} = tan^{2} x − y/(x^{2} + y^{2}), g_{y} = x/(x^{2} + y^{2}) − e^{y},

and then integrate them to get the relation g = f + c. Integrating the first on x gives g(x, y) = g(0, y) + tan x − x − arctan(x/y). Substitution into the second equation g_{y} = x/(x^{2} + y^{2}) − e^{y} gives

x/(x^{2} + y^{2}) − e^{y} = g_{y}(0, y) + (x/y^{2})/(1 + (x/y)^{2}).

Then −e^{y} = g_{y}(0, y), so g(0, y) = −e^{y} + C for some constant C. The identity arctan(u) + arctan(1/u) = π/2 can be proved by arguing that arctan(u) + arctan(1/u) has derivative zero. The constant value can be evaluated as π/2 by letting u approach infinity. In conclusion,

g(x, y) = g(0, y) + tan x − x − arctan(x/y) = −e^{y} + tan x − x + arctan(y/x) + \frac{π}{2} + C,

in short, g = f + c for some constant c.

51. (Conservative Fields and Line Integrals) Let F = ( \begin{matrix}x + y^{2} \\ 2xy \end{matrix} ). Calculate ∫_{C} F (x) · dx where C is a

smooth curve from (1, 4) to (3, 7).

Solution to 51. Let F = ( \begin{matrix}x + y^{2} \\ 2xy \end{matrix} ). The equation ∇f = F can be solved for f:

f = \frac{1}{2}x^{2} + xy^{2} + c.

This is done by writing down the two equations

f_{x} = x + y^{2}, f_{y} = 2xy,

and then solving these equations for f, as done above in another example. According to the theory of conservative fields,

∫_{C} F (x) · dx = f(3, 7) − f(1, 4) = 135.

The equation ∇ ∫_{C} F · dx = F is an obvious generalization of the calculus theorem

(d/dt) ∫_{0}^{t} f(x)dx = f(t).

Unfortunately, the 2D result is sometimes false. It is true if the field F is conservative.

51a. (Conservative Field and Line Integrals) Consider the line integral ∫_{C}(3x^{2}e^{y} dx + x^{3}e^{y} dy) where C is the

broken line curve from (0, 0) to (1, 0) to (1, 1). Show that F⃗ = ( \begin{matrix}3x^{2}e^{y} \\ x^{3}e^{y} \end{matrix} ) is ∇f for some function f

and then apply the theory of conservative fields to evaluate the integral.

Solution to 51a. The equation

F⃗ = ( \begin{matrix}3x^{2}e^{y} \\ x^{3}e^{y} \end{matrix} ) = ∇f

can be solved for the function f = x^{3}e^{y} + c using methods outlined in earlier examples. Then the theory of conservative fields applies to evaluate the integral:

∫_{C}(3x^{2}e^{y} dx + x^{3}e^{y} dy) = f(1, 1) − f(0, 0) = e.

It should be observed that the broken line path has nothing to do with the answer, only the endpoints are significant.

52. (Double Integrals) Evaluate

∫_{0}^{1} ∫_{√\overline{y}}^{1} \sqrt{3 − x^{3}}dxdy.

Solution to 52. The inner integral in

∫_{0}^{1} ∫_{√\overline{y}}^{1} \sqrt{3 − x^{3}}dxdy

is an elliptic integral and has no indefinite integral.

The iterated integral theorem, sometimes called Fubini’s Theorem, is used to switch the order of integration and make it possible to evaluate the double integral directly.

View the given integral as one side of the iterated integral theorem formula. Use the other side of the formula to do the actual evaluation.

Due to the iterated integral theorem,

∫_{0}^{1} ∫_{√\overline{y}}^{1} \sqrt{3 − x^{3}}dxdy

can be rewritten in the form

∫_{a}^{b} ∫_{c(y)}^{d(y)} \sqrt{3 − x^{3}}dydx

and evaluated exactly by elementary methods. The exact answer is \frac{2}{9} (\sqrt{27} − \sqrt{8}) = 0.526.

Maple notes on double integrals. Double integrals are computed in maple by application of the iterated integral theorem. The results are often numeric, as shown by the following example:

Example: Evaluate ∫_{0}^{1} ∫_{√\overline{y}}^{1} \sqrt{3 − x^{3}}dxdy numerically.

int(sqrt(3-x^3),x=sqrt(y)..1): int(",y=0..1):
evalf(",3);
# answer: 0.524 [yes, maple makes a small error.]
#               [Double integrals can be tricky!]

Using maple to compute double integrals has been criticized by students. They say that the trouble with double integrals is to determine which iterated form to use. The evaluation of the integrals is usually the easy part. The difficulty for everyone is in deciding upon the limits of integration in the two possible ways to present the iterated integral.

52a. (Volume by the Double Integral) Find the volume of the solid bounded by the plane x + y + 2z = 4 and the three coordinate planes x = 0, y = 0, z = 0.

Solution to 52a. Apply the theory of volumes to conclude that the answer is the integral of z over some domain D in the xy–plane. The problem is to find a description of D. Apply the iterated integral theorem to D in order to evaluate the double integral as follows:

Vol = ∫ ∫_{D} zdxdy = ∫_{0}^{4} ∫_{0}^{4−y} (2 − \frac{x}{2} − \frac{y}{2} ) dxdy = \frac{16}{3}.

53. (Green’s Theorem) Find

∫_{∂Ω} e^{x} cos ydx + e^{x} sin ydy

over the region Ω enclosed by the triangle with vertices (0, 0), (0, 4), (4, 0).

Solution to 53. By Green’s theorem,

∫_{∂Ω} e^{x} cos ydx + e^{x} sin ydy = ∫ ∫_{Ω} 2e^{x} sin ydxdy.

The region Ω enclosed by the triangle with vertices (0, 0), (0, 4), (4, 0) can be described as 0 ≤ y ≤ 4, 0 ≤ x ≤ 4 − y. By the iterated integral theorem,

∫ ∫_{Ω} 2e^{x} sin ydxdy = 2 ∫_{0}^{4} (∫_{0}^{4−y} e^{x}dx) sin ydy = cos 4 − sin 4 + e^{4} − 2.

This last integral is unpleasant to do, even with integral tables, because it reduces to ∫ e^{−y} sin ydy. Maple is somewhat easier than integral table methods.

54. (Green’s Theorem) Use Green’s theorem to calculate the area of the quadrilateral with vertices (0, 0), (1, 0), (4, 4), (4, 7).

Solution to 54. The consecutive vertices are (0, 0), (1, 0), (4, 4), (4, 7). A figure is helpful in seeing that Ω obtained by removing a smaller right triangle from a larger right triangle. So the area is 8, by geometry.

Doing it with Green’s theorem uses the area formula ∫_{∂Ω}(−y)dx. The boundary curve consists of four line segments, C_{1} to C_{4}. The values of the line integral over these four curves are 0, −6, 0, 14. The sum of the answers is again 8.

55. (Green’s Theorem) Use Green’s Theorem to evaluate the line integral

∮_{∂Ω}(cos x sin y − xy) dx + sin x cos y dy

where Ω is the half-disk defined by

Ω = {(x, y) : x^{2} + y^{2} ≤ 1 and x ≥ 0}.

Solution to 55. By Green’s Theorem,

∮_{∂Ω}(cos x sin y − xy) dx + sin x cos y dy = ∫ ∫_{Ω} xdxdy.

The half-disk Ω can be written as −1 ≤ y ≤ 1, 0 ≤ x ≤ \sqrt{1 − y^{2}}. Then the iterated integral theorem for double integrals gives the final answer

∫ ∫_{Ω} xdxdy = ∫_{−1}^{1} ∫_{0}^{√\overline{1−y^{2}}} xdxdy = ∫_{−1}^{1} \frac{1 − y^{2}}{2} dy = \frac{2}{3}.

56. (Green’s Theorem) Let F = ( \begin{matrix}y^{3} \\ x^{3} \end{matrix} ). Compute curl F and ∮_{∂Ω} F ·T ds. The set Ω is the disk x^{2} +y^{2} ≤ 1,

T is the unit tangent on ∂Ω and ds is the arc length increment.

Solution to 56. The answers: curl(F) = ( \begin{matrix}0 \\ 0 \\ 3x^{2} − 3y^{2} \end{matrix} ), x = cos t, y = sin t, 0 ≤ t ≤ 2π, T =

( \begin{matrix}− sin t \\ cos t \end{matrix} ), ds = \sqrt{x^{′2} + y^{′2}}dt = 1dt,

F · T ds = F · dx = (− sin^{4} t + cos^{4} t)dt = cos 2tdt,
curl(F) · k⃗dxdy = (3x^{2} − 3y^{2})dxdy.

The evaluation of the line integral gives

∫_{0}^{2π} F · T ds = ∫_{0}^{2π} cos 2tdt = 0.

The double integral of curl(F) · k⃗dxdy over the disk can be done using polar coordinates, giving the new integral

∫_{0}^{2π} ∫_{0}^{1}(3r^{2} cos^{2} θ − 3r^{2} sin^{2} θ)rdrdθ = ∫_{0}^{2π} cos 2θdθ = 0.

56a. (Green’s Theorem) Let F = ( \begin{matrix}y^{3} \\ x^{3} \end{matrix} ). Compute div F and ∮_{∂Ω} F · Nds. The set Ω is the disk x^{2} + y^{2} ≤ 1,

N is the unit outer normal on ∂Ω and ds is the arc length increment.

Solution to 56a. The answers: div F = 0, N = ( \begin{matrix}x \\ y \end{matrix} ), x = cos t, y = sin t, 0 ≤ t ≤ 2π, ds = dt,

F · Nds = (xy^{3} + yx^{3})ds = (cos t sin^{3} t + sin t cos^{3} t)dt,
∫_{∂Ω} F · Nds = ∫_{0}^{2π} sin t cos tdt = 0,
∫ ∫_{Ω} div F dxdy = ∫ ∫_{Ω} 0dxdy = 0.

56b. (Green’s Theorem) Prove that the flow is irrotational:

F = (xe^{tan x}, y tan(e^{y}))

Solution to 56b. The flow F is irrotational if its curl is zero.

curl(F) = | \begin{matrix}i⃗ & j⃗ & k⃗ \\ ∂_{x} & ∂_{y} & ∂_{z} \\ xe^{tan x} & y tan(e^{y}) & 0 \end{matrix} | = 0.

Instructions for Math 252, Applied Linear

Algebra. The list of 56 problems is required for 100% credit. A solution must be attempted on each of the problems. Working Together. A group may consult with other groups to check on answers or methods. A group is to submit one solution, not multiple solutions. Group size is 1 to 3 persons. Handwritten Solutions. All problems are to be solved at a desk with pencil and paper. Use maple as an assist when appropriate to check steps or to do details that are subject to human error (Less than 5% of the course has anything to do with maple). In particular, maple is not to blame for wrong answers, you are to blame. Ditto for hand calculators and other assists to computation or graphing. Partial Credit. Correct answers are worth less than 2%, because the correct answers are published. Grading is based upon what is written on the paper, the steps shown and the logic exhibited, and references to the textbook and other notable references, such as a physics or engineering monograph. You will be taught by example what is expected in a solution. Generally, the textbook is too brief, and it is a bad example of how to write up a solution. References by theorem name and page are important. Sentences that explain mathematical steps are essential to written solutions. Format. Submit solutions in one-sided format, stapled in the upper left corner. A problem starts on a new page, with the statment first. If you have no solution, then submit a blank page with the problem statement. Please observe the usual rules for solution: state the problem, solve it, and give all details, especially page references to the textbook. Bradley Gygi’s format. His personal method assigns 60% of the page width on the left for the solution and the 40% on the right is filled in later, with English sentences, page references, names of methods, theorems, formulas in the book, formulas from trig, college algebra and calculus. He leaves adequate space between lines and never, never writes irrelevant equations on the left 60%. Figures are small but detailed. Actually, Bradley wrote the problem in BLACK, the solution in BLUE and the comments on the right in RED. The color coding can be a help during review. Extra Credit. The supplementary problems may be used to increase your total score, up to 100%. For example, supplementary problem 1a may be appended to take-home exam I in order to increase credit on problem 1. However, credit earned on one problem does not apply to other problems, that is, you can’t use supplementary problem 1a to get credit on problem 2. If a problem has no supplemental parts, then no option exists. Supplementary problems may not be interleaved, they are in an appendix by themselves, at the end of the exam. They will be considered only in case the requested problem has less than full credit. For example, suppose problem 1 has credit 95%, but problem 1a appears in the appendix and has credit 97%. Then the credit on problem 1 will be 97%, the better score of the two. Groups have time to submit more supplementary problems and therefore there is some advantage to working in a group. Graphs. Maple graphs are expected to be presented in compressed format, about 2 × 2 inches, preferably pasted-up onto your engineering paper, or traced. Use a screen print to get the size right (see the notes below) or else trace the graph from the screen or draw a likeness by hand. Maple and Calculator Results. Maple session output is for you, not for the report. Keep the report handwritten and write a note that you checked it with maple or derived the result with maple commands. Pencil in the essence of the maple idea, not a log script. The same remarks apply to graphing calculators.

Take-home I [1,2,3,4]: Week 2

Take-home II [5,6,7,8,9,10]: Week 3

Take-home III [11,12,13,14,15,16] Week 4

Take-home IV [17,18,19,20,21]: Week 5

Take-home V [22,23,24,25,26,27,28]: Week 6

Take-home VI [29,30,31,32,33,34,35,36] Week 7

Take-home VII [37,38,39,40,41,42,43,44]: Week 8

Take-home VIII [45,46,47,48,49,50,51,52]: Week 9

Take-home IX [53,54,55,56] Week 10

Notes on World Wide Web

Documents

The two most popular WEB readers on local unix systems are lynx and xmosaic. The first, lynx, is VT-100 terminal based and it works well from a modem or xterm window. It has limited graphics. The NCSA product called xmosaic is made for X-windows. There are versions for the PC and MAC platforms. To set up your system for either WEB reader, issue this unix command in a terminal window or else place in your .cshrc resource file.

setenv WWW HOME http://www.math.utah.edu

In the WEB reader, you will gain access to faculty and math department pages which contain useful information. Especially useful in this course are the ones

found under faculty and Grant Gustafson. These

pages contain the source for this document, especially the maple examples, ready to paste into maple, and also the typeset copy of this document, in case you leave yours at home. Updates to the printed copy are made periodically, to correct errors or to clarify the text. There are no manual pages for lynx or xmosaic. It is understood by users of the WEB readers that help and documentation are in the reader itself. In the case of lynx, it is mapped to the question mark key. For xmosaic, there is a radio button for help in the upper right corner of the window. Additional help is available on modems and internet connections, from home or work, under the MATH page. There are pages on unix, editors, maple and matlab. It is expected that you will scan these pages for useful information related to printing graphs, making reports and programming in languages like C, Fortran, Pascal, Maple, Matlab.

Notes on Printing Multiple Graphs

The problems suggest making several graphs. While easy on a video monitor it generates too much paper in a report. Explained here for our local unix system is a method for printing several graphs on a single sheet of paper. The idea is to display the graphs on the screen, resize and move each until the screen is correct, then print the screen. Up to 8 graphs can be displayed by this mechanism. All will appear on a single sheet of paper. The resize and move commands are available on mouse menu 1. Press Mouse Left Button to activate the menu. With these two commands it is possible to shrink a graphic and reposition it anywhere on the screen. Once the screen is loaded with the graphics it can be printed to the b129lab1 laser printer by the following unix shell command. The command is to be issued in a console or terminal window.

alias paw "xdpr -root -device ps -portrait -Pb129lab1
paw

One issue of the alias command above installs the command paw and thereafter, until logout, you may use paw to print the screen. The command name paw stands for Print All Windows (sometimes called print screen). Unix wizards can install the command paw permanently by copying the alias line above to the unix resource file .cshrc in their root directory. The file .cshrc is read at login and therefore the command paw will always be available. Another possibility is to copy the following lines into the file $HOME/.twmrc (the first line should already be in the source!). The commands will appear on a mouse button in X-windows. To effect the change, restart twm or log out and log in.

"Print Window"  !"xdpr -device ps &"
"Print Screen"  !"xdpr -root -device ps -portrait &"

Newer accounts probably already have these features installed. If you have an old account, then the file ”.twmrc” can be updated by the following steps in a local terminal window:

     mv  $HOME/.twmrc  $HOME/.twmrc.old
   cp  -p  /usr/skel/.twmrc  $HOME/.twmrc