MATHEMATICS 201-105-RE
Linear Algebra

Martin Huard

Winter 2005

Assignment #2
Maple Solutions

> with(linalg):

Warning, the protected names norm and trace have been redefined and unprotected

Question 4

> A:=<<2 | 5 | -1>, <3 | 4 | 7>, <-5 | 0 | 3>>;

A := Matrix([[2, 5, -1], [3, 4, 7], [-5, 0, 3]])

> B:=<<1 | 2 | 3>, <2 | -3 | 4>, <3 | 4 | -5>>;

B := Matrix([[1, 2, 3], [2, -3, 4], [3, 4, -5]])

> C:=<<-2 | 2 | 3>, <1 | 3 | 0>>;

C := Matrix([[-2, 2, 3], [1, 3, 0]])

(a)

> evalm( (A+B)^2 );

matrix([[40, 36, 79], [-2, 80, -1], [18, -18, 44]])

(b)

> evalm( A^2+2*A&*B+B^2 );

matrix([[56, 8, 88], [55, 104, 0], [-21, -47, 4]])

(c)

> transpose(C&*inverse(B)&*A);

matrix([[251/94, (-45)/94], [221/94, 245/94], [(-356)/47, (-68)/47]])

(d)

> det(C&*transpose(C));

154

(e)

> trace(adjoint(A));

6

Question 5

(a)

> Aug:=matrix([[1,2,3,4],[5,6,7,8],[3,5,0,-1]]);

Aug := matrix([[1, 2, 3, 4], [5, 6, 7, 8], [3, 5, 0, -1]])

> backsub(gaussjord(Aug));

vector([(-4)/7, 1/7, 10/7])

Hence the solution is ( -4/7, 1/7, 10/7 ).

(b)

> Augb:=matrix([[1,2,0,3,-1,2],[3,6,5,1,0,1],[-3,-6,-10,7,-3,4]]);

Augb := matrix([[1, 2, 0, 3, -1, 2], [3, 6, 5, 1, 0, 1], [-3, -6, -10, 7, -3, 4]])

> backsub(gaussjord(Augb));

vector([2-2*_t[3]-3*_t[2]+_t[1], _t[3], -1+8/5*_t[2]-3/5*_t[1], _t[2], _t[1]])

Hence the solution is ( 2-2*r-3*s+t, r, -1+8*s/5-3*t/5, s, t ).

Question 7

(b)

> P:=matrix([[0.85,0.10,0.15],[0.1,0.85,0.05],[0.05,0.05,0.80]]);

P := matrix([[.85, .10, .15], [.1, .85, 0.5e-1], [0.5e-1, 0.5e-1, .80]])

> X0:=<<0.5>, <0.4>, <0.1>>;

X0 := Matrix([[.5], [.4], [.1]])

> X4:=evalm(P^4&*X0);

X4 := matrix([[.450546875], [.381093750], [.168359375]])

Hence the share of audience that each network will command after 4 weeks is 45.1% for CTV, 38.1% for CBC and 16.8% for Global.

> X52:=evalm(P^52&*X0);

X52 := matrix([[.4399999087], [.3600001233], [.1999999683]])

Hence the share of audience that each network will command after 1 year is 44.0% for CTV, 36.0% for CBC and 20.0% for Global.