Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

NAME: OJENIKE INIOLUWA

OLAKUNLE
MATRIC NUMBER:22NO5012
DEPARTMENT:STATISTICS

(1.)

>>A =[246;35 1;75 9];

B=[1 36];

D =[A; B];

D=
2 4 6

3 5 1

7 5 9
1 3 6

>>A =[246;35 1;75 9];

B=[1 36];

C=[5;7;2; 0];

D = [2 4 6;3 5 1;7 5 9;1 3

6];E= [D;C];

E=
2 4 6

3 5 1

7 5 9

1 3 6
5 0 2

>>A =[246;35 1;75 9];

B=[1 36];

C=[5;7;2;0];D

=[A; B];

E=[D;C];

>>E= det(E);
E=

186

>>E=inv(E);

-0.1538 -0.1538 0.1538 0.3077 -0.0385 0.1154 -0.0385 0

0.1154 -0.0385 -0.0385 -0.0769 0.1923 -0.1154 0.1923 0

0.0385 0.3077 -0.3077 -0.6154 0.0385 -0.1154 0.0385 0

-0.0192 0.2115 0.2115 0.4038 -0.0577 0.0192 -0.0577 0

0.0577 -0.0577 0.0577 0.1154 -0.2885 0.1731 -0.2885 0

0.4038 -0.1154 -0.1154 -0.2308 0.3269 -0.0769 0.3269 0

-0.2500 0.1250 0.1250 0.2500 0.2500 0.0000 -0.7500 0

0.0000 0.0000 0.0000 -1.0000 0.0000 0.0000 0.0000 0


>>E= E';

2 3 7 1 5 7 2 0

4 5 5 3 0 0 0 0

6 1 9 6 0 0 0 0

>>F=[3;17;12;-2];

17

12

-2

>>G=[574-2;312-614];

5 7 4 -2

3 12 -614

Let's analyzethematrixmultiplicationsyoumentioned:

(i) EE: This multiplication is not possible because the number of columns in matrix E (which is 3) is
notequal to the number of rows in matrix E (which is 8). The number of columns in the first matrix
mustmatchthe numberof rowsinthesecondmatrix formatrixmultiplicationtobedefined.

(ii) FF: This multiplication is not possible because the number of columns in matrix F (which is 1) is
notequal tothenumberof rowsinmatrixF(whichis4).
(iii) GG: This multiplication is possible because the number of columns in matrix G (which is 4) is equal
tothenumberofrowsinmatrix G(whichis2). Theresultingmatrixwillhavedimensions2x2.

(iv) EF:Thismultiplicationis notpossiblebecausethenumberof columnsinmatrixE (whichis3) isnotequal


tothenumberof rowsinmatrixF(whichis4).

(v) EG: This multiplication is not possible because the number of columns in matrix E (which is 3) is
notequaltothenumberof rowsinmatrixG (whichis2).

(vi) GF: This multiplication is possible because the number of columns in matrix G (which is 4) is equal
tothenumberofrowsinmatrix F(whichis 4). Theresultingmatrixwill have dimensions 2x1.

Insummary:

- Matrixmultiplications(i)EE,(ii)FF,(iv)EF, and(v)EGarenotpossible.

- Matrix multiplications (iii) GG and (vi) GF are possible.

(2.)

>>A =[246;35 1;75 9];

2 4 6
3 5 1
7 5 9

>>B =[574;-2312;-61410];

5 7 4
-2 3 12
-6 14 10

A.*B;

10 28 24

-6 15 12
-42 70 90

A * B;

-26 80 118

17 38 64
47 157 178

>>A =

det(A);A=
-48

>>B=det(B);

B=

161

>>A =inv(A);

-1.1250 1.0000 -0.1250

-0.6250 0.0000 0.1250


0.8750 -0.5000 0.1250

(3.)

>>A=[4,-8,3;-1,2, -5;3,-6, 1];

B= [16; -21;7];

a = A \ B;

("Solution:");

(solution_a);

Ans=

-3

-4

>>C=[2,3,1,-11;5,-2,5, -4;1,-1,3, -3;3,4, -7,2];

D =[1;5;3;-7];

b = C \ D;

("Solution:");

(solution_b);

ans=

-2

You might also like