0% found this document useful (0 votes)
41 views5 pages

Joshua Duncan 23002494

This document contains calculations and examples involving matrix operations in MATLAB. It defines several matrices, calculates their ranks, multiplies matrices, and performs row reduction. The key points are: Matrix A is defined and multiplied by B to give matrix C. C is then raised to the sixth power. A second matrix T is defined and its rank, null space, and reduced row echelon form are calculated. Another matrix B is defined and put into reduced row echelon form. A random matrix X is generated and its rank is found to be 6, indicating it is not invertible.

Uploaded by

Josh Duncan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views5 pages

Joshua Duncan 23002494

This document contains calculations and examples involving matrix operations in MATLAB. It defines several matrices, calculates their ranks, multiplies matrices, and performs row reduction. The key points are: Matrix A is defined and multiplied by B to give matrix C. C is then raised to the sixth power. A second matrix T is defined and its rank, null space, and reduced row echelon form are calculated. Another matrix B is defined and put into reduced row echelon form. A random matrix X is generated and its rank is found to be 6, indicating it is not invertible.

Uploaded by

Josh Duncan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

JoshuaDuncan23002494 (octave)

1. (a)

A = [0, 0; 2, 4; 9,4]

A=

0 0

2 4

9 4

clock

ans =

2.0230e+03 4.0000e+00 1.1000e+01 1.2000e+01 5.1000e+01 3.8306e+01

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

4.0530e+09 1.2064e+10 5.3250e+09

7.1558e+09 2.1300e+10 9.4017e+09

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

nullity = 4 (rank + nullity=# of columns)

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

Underlined is null space.

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=

-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 = [randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1);

randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1);

randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1);

randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1);

randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1);

randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1) randi(10,1,1);]

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

Matrix is not invertible.

(c )

rre

You might also like