CODE:
#a
M=input("Enter a 2X2 matrix::\n")
#b
dimensions=size(M)
#c
R1=M(1,:)
C1=M(:,1)
R2=M(2,:)
C2=M(:,2)
#d
P11= dot(R1,C1)
#e
P12=dot(R1,C2)
P21=dot(R2,C1)
P22=dot(R2,C2)
#f
P=[P11,P12;P21,P22]
Q=M*M
compare=P-Q
Sample Output::
Enter a 2X2 matrix::
[1,2;4,5]
M =
1 2
4 5
dimensions =
2 2
R1=
1 2
C1 =
1
4
R2 =
4 5
C2 =
2
5
P11 = 9
P12 = 12
P21 = 24
P22 = 33
P =
9 12
24 33
Q =
9 12
24 33
compare =
0 0
0 0
matlab progam A commonly used matrix operation in linea alpebrais matrix matrix multiplication. Write a script...
Question A matrix of dimensions m × n (an m-by-n matrix) is an ordered collection of m × n elements. which are called eernents (or components). The elements of an (m × n)-dimensional matrix A are denoted as a,, where 1im and1 S, symbolically, written as, A-a(1,1) S (i.j) S(m, ). Written in the familiar notation: 01,1 am Gm,n A3×3matrix The horizontal and vertical lines of entries in a matrix are called rows and columns, respectively A matrix with the...