MatLab Test Sem 1 2017 PDF

Title MatLab Test Sem 1 2017
Course Linear Algebra
Institution University of Melbourne
Pages 7
File Size 130.1 KB
File Type PDF
Total Downloads 17
Total Views 132

Summary

MatLab Test Sem 1 2017 MatLab Test Sem 1 2017...


Description

Department of Mathematics and Statistics, University of Melbourne Summer Semester 2017

MAST10007 Linear Algebra MATLAB Test Test duration: 45 minutes This paper has 7 pages (only the 5 containing the questions are numbered)

Please complete all the following details. Name:

.................................................

Student Number:

.................................................

Tutor’s Name:

.................................................

Lab Time:

.................................................

Instructions to Students: This test is designed to evaluate your comprehension of concepts in linear algebra, and your ability to calculate efficiently with the aid of MATLAB. Some questions test your understanding of the material covered in lectures, and do not necessarily require MATLAB. No partial credit is given, so please carefully check anything typed into MATLAB, and check the output of code used. Any rough working must be done on this paper, but only the final answer is marked. Answer all multiple choice questions by circling the correct answer(s). The number of marks for each question is indicated and the total number of marks is 20. Some MATLAB commands: • rref(A) gives the fully reduced row echelon form of A • A′ is the transpose of the matrix A • det(A) gives the determinant of the matrix A • eye(n) gives the identity matrix of size n × n • inv(A) gives the inverse of A • ones(p, q) gives the p × q matrix of all 1’s • zeros(p, q) gives the p × q matrix of all 0’s • diag(v) gives the diagonal matrix with diagonal v • The command v = B(:,3) selects the third column of B, for example. • dot(u, v) gives the dot product of the vectors u and v . Do not turn over until instructed to do so.

Rough working — will not be graded

1. Consider the matrix



     X=     

−1 0 0 0 4 4 4 4

0 0 0 0 4 4 4 4

0 0 1 0 4 4 4 4

0 0 0 2 4 4 4 4

7 7 7 7 1 1 1 1

7 7 7 7 1 1 1 1

7 7 7 7 1 1 1 1

7 7 7 7 1 1 1 1

           

(a) Let a denote the vector corresponding to the second row of X, let b denote the vector corresponding to the fourth column of X, and let c denote the vector corresponding to the third column of X. Calculate −a + 2b + c.

(b) Calculate the Euclidean distance between the vectors corresponding to the 3rd and 4th rows.

(c) Calculate the orthogonal projection of the vector corresponding to the 1st row onto the direction of the vector corresponding to the 2nd row, giving your answer in terms of exact numbers.

(d) Add to X the matrix corresponding to the MatLab code Y = [diag([1, 0, −1, −2]) zeros(4, 4); zeros(4, 4) zeros(4, 4)] What is the dimension of the solution space of X + Y ?

[4 marks]

1

2. Let

1 −3 4 −2 2 6 9 −1  A = 1 −3 5 1 2 −6 9 −1

 5 4 8 2   3 −2  9 7

(a) What is the dimension of the row space.

(b) Write the vector corresponding to the 4th column as a linear combination of the first and third columns. For this purpose, denote the columns by c1 , . . . , c6 in order.

(c) Let t ∈ R. Circle the vector(s) that is (are) in the solution       −3 37 14  1 0  0         0 −4 −3    −  t  0 0  1         0 −5  0  0 1 0 (d) Let t ∈ R. Circle the vector(s) that  v1 = 7  v2 = 2  v3 = t 2

space of A.   23  0   −1   −1   −5 1

is (are) in the row space of A.  −21 32 −2 31 24  3 −1 −5 0 1  −6 9 −1 9 7

(e) Let B be obtained from the matrix A by appending 4 extra columns to the right, each with entries all 0. What is the rank of B ?

[5 marks]

2

3. You are given that the transition matrix PC,B from a basis B = {b1 , b2 , b3 , b4 , b5 } to a basis C = {c1 , c2 , c3 , c4 , c5 } is   1 −1 0 0 0 0 1 −1 0 0   1 0 0 1 −1 0    2 0 0 0 1 −1  0 0 0 0 1 (a) Write down the vector u = b1 + b2 + b3 + b4 + b5 as a linear combination of the vectors in C. Also, specify [u]C .

(b) Calculate PB,C , writing down the final answer only.

(c) Suppose c1 = (1, 0, 0, 0, 0),

c2 = (1, 2, 0, 0, 0),

c4 = (1, 2, 3, 4, 0),

c3 = (1, 2, 3, 0, 0)

c5 = (1, 2, 3, 4, 5).

Compute PS,B , writing down the final answer only,

[4 marks]

3

4. (a) Let 0 1  A = 1 1

1 0 0 1

1 0 0 0

 1 1  0 0

Suppose A is the adjacency matrix for a graph, with vertices A, B, C and D, and with rows and columns in this order. Draw the graph corresponding to A.

(b) In the setting of (a), calculate the number of walks from vertex A to vertex C using exactly 9 edges.

(c) You have been given a coded message containing the word of a fruit. The original word had letters replaced by numbers according to A ↔ 1, B ↔ 2 etc., and the letters were placed down the columns of a 3 × 3 matrix in order, then coded by multiplication on the left by    1 4 4 1 0 0 C = 0 1 3  7 1 0 0 0 1 1 2 1 You receive the message

692, 265, 48, 241, 105, 23, 692, 259, 45 reading down the columns of the matrix. What is the fruit?

(d) A linear transformation T : R3 → R2 has a standard matrix representation   2 0 1 AT = 0 2 1 Draw on a graph the image under the linear transformation T of the unit cube formed by the three vectors i, j, k. Your graph should consist of the image of the corners and edges.

[4 marks]

4

5. You are given the following table of data: x 3 5 9 13

y 0 2 4 6

(a) With  1 3 9  1 5 25   A=  1 9 81  1 13 169 

calculate AT A, writing down the final answer only.

  0  2 T  (b) With A as above and y =   4 calculate A y, writing down the final answer only. 6

(c) Calculate the least squares quadratic equation of best fit for the table of data, writing down the final answer only.

[3 marks]

5...


Similar Free PDFs