Professional Documents
Culture Documents
STAT
STAT
OLAKUNLE
MATRIC NUMBER:22NO5012
DEPARTMENT:STATISTICS
(1.)
B=[1 36];
D =[A; B];
D=
2 4 6
3 5 1
7 5 9
1 3 6
B=[1 36];
C=[5;7;2; 0];
6];E= [D;C];
E=
2 4 6
3 5 1
7 5 9
1 3 6
5 0 2
B=[1 36];
C=[5;7;2;0];D
=[A; B];
E=[D;C];
>>E= det(E);
E=
186
>>E=inv(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.
(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.
(2.)
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);
(3.)
B= [16; -21;7];
a = A \ B;
("Solution:");
(solution_a);
Ans=
-3
-4
D =[1;5;3;-7];
b = C \ D;
("Solution:");
(solution_b);
ans=
-2