Simplify the Matrix
Problem
[[1,0,1],[0,1,1],[0,0,1]]*[[1,1,2],[1,2,3],[3,4,7]]*[[1,1,0],[1,2,0],[3,4,1]]
Solution
Multiply the first two matrices together by calculating the dot product of each row of the first matrix with each column of the second matrix.
A=[[1*(1)+0*(1)+1*(3),1*(1)+0*(2)+1*(4),1*(2)+0*(3)+1*(7)],[0*(1)+1*(1)+1*(3),0*(1)+1*(2)+1*(4),0*(2)+1*(3)+1*(7)],[0*(1)+0*(1)+1*(3),0*(1)+0*(2)+1*(4),0*(2)+0*(3)+1*(7)]]
A=[[4,5,9],[4,6,10],[3,4,7]]
Multiply the resulting matrix A by the third matrix.
B=[[4*(1)+5*(1)+9*(3),4*(1)+5*(2)+9*(4),4*(0)+5*(0)+9*(1)],[4*(1)+6*(1)+10*(3),4*(1)+6*(2)+10*(4),4*(0)+6*(0)+10*(1)],[3*(1)+4*(1)+7*(3),3*(1)+4*(2)+7*(4),3*(0)+4*(0)+7*(1)]]
Simplify the arithmetic for each element to find the final product.
B=[[4+5+27,4+10+36,9],[4+6+30,4+12+40,10],[3+4+21,3+8+28,7]]
B=[[36,50,9],[40,56,10],[28,39,7]]
Final Answer
[[1,0,1],[0,1,1],[0,0,1]]*[[1,1,2],[1,2,3],[3,4,7]]*[[1,1,0],[1,2,0],[3,4,1]]=[[36,50,9],[40,56,10],[28,39,7]]
Want more problems? Check here!