-
Notifications
You must be signed in to change notification settings - Fork 0
/
TO FIND MATRIX MULTIPLICATION FOR 3X3 MATRIX.py
18 lines (18 loc) · 1.33 KB
/
TO FIND MATRIX MULTIPLICATION FOR 3X3 MATRIX.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
M11,M12,M13=int(input('ENTER A NUMBER OF THE ELEMENT M11:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT M12:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT M13:''\t'))
M21,M22,M23=int(input('ENTER A NUMBER OF THE ELEMENT M21:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT M22:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT M23:''\t'))
M31,M32,M33=int(input('ENTER A NUMBER OF THE ELEMENT M31:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT M32:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT M33:''\t'))
N11,N12,N13=int(input('ENTER A NUMBER OF THE ELEMENT N11:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT N12:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT N13:''\t'))
N21,N22,N23=int(input('ENTER A NUMBER OF THE ELEMENT N21:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT N22:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT N23:''\t'))
N31,N32,N33=int(input('ENTER A NUMBER OF THE ELEMENT N31:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT N32:''\t')),int(input('ENTER A NUMBER OF THE ELEMENT N33:''\t'))
A=(M11*N11+M12*N21+M13*N31)
B=(M11*N12+M12*N22+M13*N32)
C=(M11*N13+M12*N23+M13*N33)
D=(M21*N11+M22*N21+M23*N31)
E=(M21*N12+M22*N22+M23*N32)
F=(M21*N13+M22*N23+M23*N33)
G=(M31*N11+M32*N21+M33*N31)
H=(M32*N12+M32*N22+M33*N32)
I=(M33*N13+M32*N23+M33*N33)
print(list([A,B,C]))
print(list([D,E,F]))
print(list([G,H,I]))