title: Multiplying arrays with broadcasting
body: <p>I have an mxn A matrix and an nxr B matrix that I want to multiply in a specific way to get an mxr matrix. I want to multiply every element in the ith column of A as a scalar to the ith row of B and the sum the n matrices</p>
  
  <p>For example</p>
  
  <pre><code>a = [[0, 1, 2],
       [3, 4, 5],
  
  b = [[0, 1, 2, 3],
       [4, 5, 6, 7],
       [8, 9, 10, 11]]
  </code></pre>
  
  <p>The product would be</p>
  
  <pre><code>a*b = [[0, 0, 0, 0],  +  [[4, 5, 6, 7],      +  [[16, 18, 20, 22],  =  [[20, 23, 26, 29],
         [0, 3, 6, 9]]      [16, 20, 24, 28]]      [40, 45, 50, 55]]      [56, 68, 80, 92]]
  </code></pre>
  
  <p>I can't use any loops so I'm pretty sure I have to use broadcasting but I don't know how. Any help is appreciated</p>