The third midterm

Practice problems with solutions

Computations with matrices

a. Matrix products: Homework 5, problem 4 & problem 5

b. Consider the following matrices:

A=(131201),B=(33)A= \mat 1 & 3 & -1 \\ 2 & 0 & 1\rix, \qquad B= \mat 3 & 3\rix

Compute each of the following matrix expressions, if they are defined:

  1. ABAB, BABA, AAAA^\top, AAA^\top A

AB can’t multiply 2×3 and 1×2BA=(990)AA=(11115)AA=(531393132)\begin{aligned} AB& \text{ can't multiply $2\times 3$ and $1\times 2$} \\ BA&= \mat 9 & 9 & 0\rix\\ AA^\top&= \mat 11 & 1 \\ 1 & 5\rix\\ A^\top A&= \mat 5 & 3 & 1 \\ 3 & 9 & -3\\ 1 & -3 & 2\rix \end{aligned}

  1. BBBB^\top, BBB^\top B

BB=(18),BB=(9999) BB^\top = \mat 18\rix, \qquad B^\top B= \mat 9 & 9 \\ 9& 9 \rix

  1. A2A^2 is not defined because AA is not square
  2. (AA)2=(122161626)(AA^\top)^2 = \tmat 122 & 16 \\ 16 & 26\trix
  3. ABBA=(8181081810000)A^\top B^\top B A = \tmat 81&81&0\\81&81&0\\ 0&0&0 \trix
  4. AA+BBAA^\top+BB^\top is undefined because AAAA^\top and BBBB^\top do not have the same size
  5. AA+BB=(20101014)AA^\top+B^\top B = \tmat 20&10\\10&14\trix

Compute the matrix of T:VVT:V\to V with respect to a given basis of VV

a. V=P4(R)V=\cP_4(\R), the standard basis {1,x,x2,x3,x4}\{1,x,x^2,x^3,x^4\}, Tf(x)=f(x)xf(x)Tf(x) = f''(x)-xf'(x)

T(1)=0T(x)=xT(x2)=22x2T(x3)=6x3x3T(x4)=12x24x4}    [T]1,x,x2,x3,x4=(00200010600020120003000004)\left. \begin{aligned} T(1) &= 0\\ T(x) &=-x\\ T(x^2)&=2-2x^2\\ T(x^3)&=6x-3x^3\\ T(x^4)&=12x^2-4x^4 \end{aligned}\right\}\implies [T]_{1, x, x^2, x^3, x^4}=\mat 0& 0 & 2 & 0 & 0\\ 0&-1 & 0 & 6 & 0\\ 0& 0 &-2 & 0 &12\\ 0& 0 & 0 &-3 & 0\\ 0& 0 & 0 & 0 &-4 \rix

b. V=R2V=\R^2 and T:R2R2T:\R^2\to\R^2 is given by T(x1,x2)=(2x1,x2)T(x_1, x_2) = (2x_1, x_2).

Te1=2e1Te2=e2}    [T]e1,e2=(2001)\left. \begin{gathered} Te_1=2e_1 \\ Te_2=e_2 \end{gathered}\right\}\implies [T]_{e_1, e_2}= \mat 2 & 0 \\ 0 & 1\rix

Tu=(22)=au+bv,Tv=(41)=cu+dvTu = \binom 22= au+bv, \qquad Tv=\binom41 = cu+dv

Solve for a,b,c,da,b,c,d:

au+bv=(a+2b2a+b)=(22)    a=b=23cu+dv=(c+2d2c+d)=(41)    c=23,d=73}    [T]u,v=(2/32/32/37/3)\left. \begin{gathered} au+bv=\binom{a+2b}{2a+b} = \binom{2}{2}\implies a=b=\frac23 \\ cu+dv=\binom{c+2d}{2c+d}= \binom 41\implies c=-\frac23, d=\frac{7}{3} \end{gathered}\right\} \implies [T]_{u,v}=\mat 2/3 & -2/3 \\ 2/3 & 7/3\rix

c. VV is the vector space

V={(x1,x2,x3)R3x1+x2+x3=0},V=\{(x_1,x_2,x_3)\in\R^3 \mid x_1+x_2+x_3=0\},

with basis {u,v}\{u,v\} where u=(110)u = \tmat 1\\-1\\0\trix, v=(011)v=\tmat 0\\1\\-1 \trix, and T:VVT:V\to V is the linear transformation T(x1,x2,x3)=(x3,x1,x2).T(x_1, x_2, x_3) = (x_3,x_1,x_2).

The vector space VV is a linear subspace of R3\R^3. It contains the two vectors u,vu,v and we are given they form a basis for VV, so VV is two dimensional: VV is a plane.

Compute TuTu and TvTv and write them as linear combinations of uu and vv.

Tu=(011)=v,Tv=(101)=uv    [T]u,v=(0111)Tu= \tmat 0 \\ 1\\ -1\trix = v,\quad Tv= \tmat -1\\0\\1\trix=-u-v\implies [T]_{u,v} = \mat 0 & -1 \\ 1 & -1\rix

Compute some determinants

a. From the book, page 237,Problem 4

b. For which value of aRa\in\R is (1a1a11111) \tmat 1 &a &1\\a & 1 & 1 \\ 1 & 1 & 1 \trix invertible?

Fact: a matrix is invertible if and only if its determinant is not zero. We compute (subtract the 1st column from the 2nd and 3rd columns)

1a1a11111=1a10a1a1a100=(a1)2.\deter1 &a &1\\a & 1 & 1 \\ 1 & 1 & 1 \minant= \deter1 &a-1 &0\\a & 1-a & 1-a \\ 1 & 0 & 0\minant= -(a-1)^2.

So the matrix is always invertible, except when a=1a=1.

c. Subtract the first column from each of the other columns:

11111123451357914710131591317=1000011234124691369121481216=0.\deter 1& 1 & 1& 1& 1\\ 1& 2 & 3& 4& 5\\ 1& 3 & 5& 7& 9\\ 1& 4 & 7& 10& 13\\ 1& 5 & 9& 13& 17 \minant= \deter 1& 0 & 0& 0& 0\\ 1& 1 & 2& 3& 4\\ 1& 2 & 4& 6& 9\\ 1& 3 & 6& 9& 12\\ 1& 4 & 8& 12& 16 \minant =0 .

The last determinant is zero because the third column is twice the second column.

d. Let A=(121201503)A=\tmat 1& 2 & 1\\ 2& 0 &-1 \\ -5& 0 &3 \trix, and let B=A1B=A^{-1}. Compute the cofactor matrix of AA. Then use the cofactor formula to compute b11b_{11}, b12b_{12}, and b13b_{13}.

e. Let A=(121201503)A=\tmat 1& 2 & 1\\ 2& 0 &-1 \\ -5& 0 &3 \trix. Use row reduction (or “Gaussian elimination”) to compute A1A^{-1}.

f. For which values of tRt\in\R are the vectors

u=(12t),v=(21t),w=(1t0)u=\mat 1 \\ 2 \\ t\rix,\quad v=\mat 2 \\ 1 \\ t\rix,\quad w=\mat 1 \\ t \\ 0\rix

a basis of R3\R^3?

Answer. {u,v,w}\{u,v,w\} is a basis if and only if

0det(u,v,w)=12121ttt0=11121tt00=t111t=t(t+1)0\neq\det(u,v,w)= \deter 1 & 2 & 1\\ 2 & 1 & t\\ t & t & 0 \minant= \deter 1 & 1 & 1\\ 2 & -1 & t\\ t & 0 & 0 \minant=t\deter1&1\\-1&t\minant=t(t+1)

So {u,v,w}\{u,v,w\} is a basis if and only if t0t\neq0 and t1t\neq-1.

True/False?

  1. For any k×k\times \ell matrix AA, the matrix product AAAA^\top is always defined, no matter what kk and \ell are. True: the sizes match.

  2. If A=(131201)A= \tmat1 & 3 & -1 \\ 2 & 0 & 1\trix, then det(AA)=det(A)det(A)\det(AA^\top) = \det (A) \det (A^\top) AA is not a square matrix so its determinant is not defined: False!

  3. If AA is a square matrix then det(AA)0\det(A^\top A) \geq 0 det(AA)=det(A)det(A)=det(A)det(A)=(detA)2\det(A^\top A) = \det (A^\top)\det(A)=\det(A)\det(A)=(\det A)^2\geq, so True.

  4. If AA is a square matrix with A=AA=-A^\top, then detA=detA\det A^\top = \det A.

    For an n×nn\times n matrix AA one always has det(cA)=cndetA\det(cA)=c^n\det A. Therefore det(A)=(1)ndet(A)\det(-A)=(-1)^n\det(A). If A=AA^\top=-A then we have det(A)=det(A)=(1)ndetA\det(A)=\det(A^\top)=(-1)^n\det A.

    If nn is even then this just says det(A)=det(A)\det(A^\top)=\det(A) so the statement is true. If nn is odd then we get det(A)=det(A)\det(A)=-\det(A) so det(A)=0\det(A)=0. Thus S\det(A^\top)=\det(A)$ because both are zero.

  5. If AA is a 3×33\times 3 square matrix with A=AA^\top=-A then detA=0\det A=0 True; see the previous question with n=3n=3.

  6. If AA is a square matrix with A2=OA^2=O then A=OA=O. Example: A=(0100)A=\tmat 0&1\\0&0\trix. This matrix satisfies A2=OA^2=O.

  7. If AA is an n×nn\times n matrix and if there is a nonzero vector xFnx\in\F^n with Ax=0Ax=0 then detA=0\det A = 0.True. If Ax=0Ax=0 and x0x\neq 0 then xN(A)x\in N(A) so N(A){0}N(A)\neq \{0\}. Hence AA is not injective, and hence detA=0\det A=0.

  8. If AA is a square matrix with A2=OA^2=O then detA=0\det A=0. True. If A2=OA^2= O then det(A)2=det(A)det(A)=det(AA)=det(A2)=det(O)=0\det(A)^2=\det(A)\det(A)=\det(A\cdot A)=\det(A^2)=det(O)=0. Therefore det(A)=0\det(A)=0.

  9. From the book: §4.4, page 236, problem 1—if a T/F question claims some equation, and you think it is wrong, say how the equation can be fixed.