title: LinAlgError: Last 2 dimensions of the array must be square
body: <p>I need to solve a set of simultaneous equations of the form <strong>A</strong>x = <strong>B</strong> for x. I've used the numpy.linalg.solve function, inputting A and B, but I get the error 'LinAlgError: Last 2 dimensions of the array must be square'. How do I fix this? </p>
  
  <p>Here's my code:</p>
  
  <pre><code>A = matrix([[v1x, v2x], [v1y, v2y], [v1z, v2z]])
  print A
  
  B = [(p2x-p1x-nmag[0]), (p2y-p1y-nmag[1]), (p2z-p1z-nmag[2])]
  print B
  
  x = numpy.linalg.solve(A, B)
  </code></pre>
  
  <p>The values of the matrix/vector are calculated earlier in the code and this works fine, but the values are:</p>
  
  <p><strong>A</strong> = </p>
  
  <pre><code>(-0.56666301, -0.52472909)
  (0.44034147, 0.46768087)
  (0.69641397,  0.71129036)
  </code></pre>
  
  <p><strong>B</strong> = </p>
  
  <pre><code>(-0.38038602567630364, -24.092279373295057, 0.0)
  </code></pre>
  
  <p>x should have the form (x1,x2,0)</p>