Python multiply 2 arrays <p>This is continued from thread: <a href="http://stackoverflow.com/questions/5825208/python-array-multiply">Python array multiply</a></p> <p>I need to multiply array vs array. I don't want to use "numpy". From previous thread, I learned how to multiply </p> <p>number*array:</p> <pre><code>hh=[[82.5], [168.5]] N=1./5 ll = [[x*N for x in y] for y in hh] </code></pre> <p><strong>But how can I multiply array*array:</strong> -><strong>matrix multiplication.</strong></p> <pre><code>hh=[[82.5], [168.5]] N=zip(*hh) -&gt; N must be transpose of hh!!!!! ll = [[[x*z for x in y] for y in hh] for z in N] </code></pre> <p>? thanks</p> <hr> <h2>EDIT:</h2> <p><strong>input:</strong> </p> <pre><code>hh=[[82.5], [168.5]] N=zip(*hh) #N=[(82.5, 168.5)] </code></pre> <p><strong>output want: hh*N</strong></p> <pre><code>[[ 6806.25 13901.25] [ 13901.25 28392.25]] </code></pre>