Matematik och Datavetenskap, Chalmers Tekniska Högskola och Göteborgs Universitet

ALA-B, 2000, studio 4.3

Home, w 1, w 2, w 3, w 4, w 5, w 6, w 7. Matlab: analysis, linear algebra, facit.

obs!! innehållet i denna sida är ännu inte slutligt fastställt!! obs!!

Linear algebra in R^n, part 1

In these exercises you should do all computations first by hand and then with matlab.

1. Form the following column vectors in R^4: a=[1; 2; 3; 4], b=[4; 3; 2; 1], c=2*a-3*b

2. Scalar product, Ch 45.3-4. Compute the scalar products (a,b), (b,a) and the norms of the vectors a,b,c. Hint: the scalar product (a,b) is easily computed as b'*a. Compute these first by by hand and then with matlab. Compute the angle between a and b.

3. Matrix algebra. Form the matrix A=[a b c]. Compute the type of A and A' (in matlab: size(A)). Compute A*A', A'*A, b*A, b'*A, A*b. (Note: some of these are not defined.) Compute A(:,2).

4. Subspace of linear combininations, Ch 45.5. Compute

2*a - 4*b + c,
Ax with x=[2;-4;1] and A as above,
A*x with x=[1;0;0], x=[0;1;0], x=[0;0;1].

Note that the first one is equal to the second one. Prove that Ax is a linear combination of a,b,c, namely, Ax=x_1a+x_2b+x_3c.

Define V=the set of linear combinations of a,b,c, as on page 477. Show that if u,v belong to V and x is a number, then u+v belongs to V and xu belongs to V. This means that V is a subspace of R^4.

Does v=[1; 1; 1; 1] belong to V?

Hint: solve Ax=v. By hand: Gauss elimination. In matlab: the staircase (echelon) matrix is computed by the function rref(A). To solve Ax=v, add the column v to A, B=[A v], and do rref(B).

Answer: x=[.2;.2;0]+t*[-2;3;1], so that v=(.2-2*t)*a + (.2+3*t)*b + t*c, where t is an arbitrary number.

Does v=[1; 1; 1; 0] belong to V? Answer: no, Ax=v has no solution.

5. Linear independence, ch 45.7. Check if the vectors a,b,c are linearly independent: solve the equation x_1a+x_2b+x_3c=0, which can be written Ax=0. Use the Gauss elimination method by hand. In matlab the staircase (echelon) matrix is computed by the function rref(A).

6. Basis, ch 45.8-12. It turns out that we can eliminate one of the vectors, e.g., c and the remaining vectors a,b are linearly independent and they span the whole subspace V. This means that they are a basis for V. What is the dimension of V?

Express v=[1; 1; 1; 1] uniquely as a linear combination of the basis vectors a,b.

Express c uniquely as a linear combination of the basis vectors a,b.

/stig


Last modified: Mon Nov 5 17:16:11 MET 2001