title: Matrix operations in Java
body: <p>I looked for this everywhere, but I am wrong somewhere. In my Java program, I created few 2D Arrays. Now, I need to form new 2D arrays with previous, like, inverse, transpose, multiplying , LEFT DIVISION and maybe even more. Some of them (simple) I created myself, but left division, right division, inverse I didn't.</p>
  
  <p>By using libs like Jama, some problem appears.</p>
  
  <pre><code>java.lang.RuntimeException: Matrix is rank deficient.
  </code></pre>
  
  <p>And I code it like this:</p>
  
  <pre><code>Matrix Am=new Matrix(A);
  Am=Am.inverse();
  </code></pre>
  
  <p><code>A</code> is 2D Array (m x n), and <code>Am</code> is new matrix created from 2DArray A.</p>
  
  <p>I tried to do this to get left division, but I cannot solve matrix inverse first.</p>
  
  <p>Where is my mistake? Does someone know another library to convert from 2DArray to Matrix, and then do harder matrix operations (left div, inv...) with it?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I use inverse on this matrix to get A\P (can be computed as inverse(A)*P as I saw somewhere). Do you know how to get A\P with Jama? This is my primary probleb, left division.</p>