Multiply the Matrices
Problem
[[0,0,1,1],[1,0,1,0],[0,0,0,1],[0,1,0,0]]*[[0,0,1,1],[1,0,1,0],[0,0,0,1],[0,1,0,0]]
Solution
Identify the dimensions of the matrices. Both are 4×4 matrices, so the resulting product will also be a 4×4 matrix.
Calculate the elements of the first row by multiplying the first row of the left matrix by each column of the right matrix.
(R_1)*(C_1)=(0)*(0)+(0)*(1)+(1)*(0)+(1)*(0)=0
(R_1)*(C_2)=(0)*(0)+(0)*(0)+(1)*(0)+(1)*(1)=1
(R_1)*(C_3)=(0)*(1)+(0)*(1)+(1)*(0)+(1)*(0)=0
(R_1)*(C_4)=(0)*(1)+(0)*(0)+(1)*(1)+(1)*(0)=1
Calculate the elements of the second row.
(R_2)*(C_1)=(1)*(0)+(0)*(1)+(1)*(0)+(0)*(0)=0
(R_2)*(C_2)=(1)*(0)+(0)*(0)+(1)*(0)+(0)*(1)=0
(R_2)*(C_3)=(1)*(1)+(0)*(1)+(1)*(0)+(0)*(0)=1
(R_2)*(C_4)=(1)*(1)+(0)*(0)+(1)*(1)+(0)*(0)=2
Calculate the elements of the third row.
(R_3)*(C_1)=(0)*(0)+(0)*(1)+(0)*(0)+(1)*(0)=0
(R_3)*(C_2)=(0)*(0)+(0)*(0)+(0)*(0)+(1)*(1)=1
(R_3)*(C_3)=(0)*(1)+(0)*(1)+(0)*(0)+(1)*(0)=0
(R_3)*(C_4)=(0)*(1)+(0)*(0)+(0)*(1)+(1)*(0)=0
Calculate the elements of the fourth row.
(R_4)*(C_1)=(0)*(0)+(1)*(1)+(0)*(0)+(0)*(0)=1
(R_4)*(C_2)=(0)*(0)+(1)*(0)+(0)*(0)+(0)*(1)=0
(R_4)*(C_3)=(0)*(1)+(1)*(1)+(0)*(0)+(0)*(0)=1
(R_4)*(C_4)=(0)*(1)+(1)*(0)+(0)*(1)+(0)*(0)=0
Final Answer
[[0,0,1,1],[1,0,1,0],[0,0,0,1],[0,1,0,0]]*[[0,0,1,1],[1,0,1,0],[0,0,0,1],[0,1,0,0]]=[[0,1,0,1],[0,0,1,2],[0,1,0,0],[1,0,1,0]]
Want more problems? Check here!