Joshua Duncan 23002494
Joshua Duncan 23002494
1. (a)
A = [0, 0; 2, 4; 9,4]
A=
0 0
2 4
9 4
clock
ans =
B = [2,4,1;1,5,3]
B=
2 4 1
1 5 3
(b)
C = A*B
C=
0 0 0
8 28 14
22 56 21
rank (C)
ans = 2
(c)
D = C^6
D=
0 0 0
rank (D)
ans = 2
2. (a)
T = [2,3,4,5,6,7;3,4,5,6,7,8;4,5,6,7,8,9;5,6,7,8,9,10;6,7,8,9,10,11;7,8,9,10,11,12]
T=
2 3 4 5 6 7
3 4 5 6 7 8
4 5 6 7 8 9
5 6 7 8 9 10
6 7 8 9 10 11
7 8 9 10 11 12
(b)
i.
rank (T)
ans = 2
ii.
rref (T)
ans =
1 0 -1 -2 -3 -4
0 1 2 3 4 5
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
iii.
R = T([1,2],:)
R=
2 3 4 5 6 7
3 4 5 6 7 8
iv.
S = T(: ,[1,2])
S=
2 3
3 4
4 5
5 6
6 7
7 8
(c )
1 0 -1 -2 -3 -4
0 1 2 3 4 5
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
1 = leading
N = [-1,-2,-3,-4;2,3,4,5;0,0,0,0;0,0,0,0;0,0,0,0;0,0,0,0]
N=
-1 -2 -3 -4
2 3 4 5
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
RN should be the orthogonal to R, because “The rank–nullity theorem is a theorem in linear algebra,
which asserts that the dimension of the domain of a linear map is the sum of its rank and its nullity”.
R*N
ans =
4 5 6 7, 5 6 7 8
3. (a)
B=
-32 16 -8 4 -2 -107
-1 1 -1 1 -1 -2
0 0 0 0 0 3
1 1 1 1 1 -2
32 16 8 4 2 1
243 81 27 9 3 78
(b)
rref(B)
ans =
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
(c )
4. (a)
X=
4 4 2 7 9 9
1 4 10 8 1 7
10 9 9 4 8 3
2 3 9 4 7 7
8 3 10 9 5 6
5 3 8 8 2 2
(b)
rank(X)
ans = 6
rank(A) + nullity(A) = n
6+ 0 = 6
(c )
rre