title: compute matrix product for multiple inputs
body: <p>I am trying to compute a transform given by b = A*x. A is a (3,4) matrix. If x is one (4,1) vector the result is b (3,1). </p>
  
  <p>Instead, for x I have a bunch of vectors concatenated into a matrix and I am trying to evaluate the transform for each value of x. So x is (20, 4). How do I broadcast this in numpy such that I get 20 resulting values for b (20,3)? </p>
  
  <p>I could loop over each input and compute the output but it feels like there must be a better way using broadcasting.</p>
  
  <p>Eg. </p>
  
  <pre><code>A = [[1,0,0,0],
  [2,0,0,0],
  [3,0,0,0]]
  </code></pre>
  
  <p>if x is:</p>
  
  <pre><code>x = [[1,1,1,1],
  [2,2,2,2]]
  
  b = [[1,2,3],
  [2,4,6]]
  </code></pre>
  
  <p>Each row of x is multiplied with A and result is stored as a row in b.</p>