Multiply the Matrices
Problem
[[1,0,0,0,1],[0,2,1,1,0],[0,1,2,1,1],[0,1,1,2,1],[1,0,1,1,3]]*[[0,1,0,0,0],[1,0,0,0,1],[0,0,0,1,1],[0,0,1,0,1],[0,1,1,1,0]]
Solution
Identify the dimensions of the matrices. Both are 5×5 matrices, so the resulting product will also be a 5×5 matrix.
Calculate the entries of the first row by taking the dot product of the first row of the left matrix with each column of the right matrix.
(R_1)⋅(C_1)=(1)*(0)+(0)*(1)+(0)*(0)+(0)*(0)+(1)*(0)=0
(R_1)⋅(C_2)=(1)*(1)+(0)*(0)+(0)*(0)+(0)*(0)+(1)*(1)=2
(R_1)⋅(C_3)=(1)*(0)+(0)*(0)+(0)*(0)+(0)*(1)+(1)*(1)=1
(R_1)⋅(C_4)=(1)*(0)+(0)*(0)+(0)*(1)+(0)*(0)+(1)*(1)=1
(R_1)⋅(C_5)=(1)*(0)+(0)*(1)+(0)*(1)+(0)*(1)+(1)*(0)=0
Calculate the entries of the second row.
(R_2)⋅(C_1)=(0)*(0)+(2)*(1)+(1)*(0)+(1)*(0)+(0)*(0)=2
(R_2)⋅(C_2)=(0)*(1)+(2)*(0)+(1)*(0)+(1)*(0)+(0)*(1)=0
(R_2)⋅(C_3)=(0)*(0)+(2)*(0)+(1)*(0)+(1)*(1)+(0)*(1)=1
(R_2)⋅(C_4)=(0)*(0)+(2)*(0)+(1)*(1)+(1)*(0)+(0)*(1)=1
(R_2)⋅(C_5)=(0)*(0)+(2)*(1)+(1)*(1)+(1)*(1)+(0)*(0)=4
Calculate the entries of the third row.
(R_3)⋅(C_1)=(0)*(0)+(1)*(1)+(2)*(0)+(1)*(0)+(1)*(0)=1
(R_3)⋅(C_2)=(0)*(1)+(1)*(0)+(2)*(0)+(1)*(0)+(1)*(1)=1
(R_3)⋅(C_3)=(0)*(0)+(1)*(0)+(2)*(0)+(1)*(1)+(1)*(1)=2
(R_3)⋅(C_4)=(0)*(0)+(1)*(0)+(2)*(1)+(1)*(0)+(1)*(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