# contrariwise multiplying a list into each raw of a matrix

We have below list which is extended from the left to the right as

 originlist={{1,2,1},{0,2,1},{0,0,3},{2,0,1}}


Additionally, we are dealing with a distinct matrix which is drawn here:

matrix={{1,0,Sqrt[3],0},{0,1,1,0},{1/2,0,0,1/2},{1,0,0,0}};


We are about to multiply each element of the list into matrix's element in a way: the last term of list must multiply to the first term of each matrix's raw whose result must be as:

modifiedmatrix={{{2,0,1},0,Sqrt[3]{0,2,1},0},{0,{0,0,3},{0,2,1},0},{1/2{2,0,1},0,0,1/2{1,2,1}},{{2,0,1},0,0,0}}


How can we reach this aim?

• What do you expect from 0 * {1,2,3} and why? Is this acceptable: Reverse[originlist] # & /@ matrix? – Kuba Oct 26 '18 at 9:09
• your answer is completely Ok and correct. Thanxxxxx – monfneg Oct 26 '18 at 10:36