title: How Julia use Lufact to solve Ax=b
body: <p>I want to recreate a solve function(solve Ax = b for x) for sparse matrix.
  In the Julia documentation, it says that when we applied a sparse matrix to lufact(), it returns the following:</p>
  
  <pre><code>L, U, p, q, Rs = F[:(:)]
  </code></pre>
  
  <p>With the given formula in Julia doc: LU = Rs.*A[p,q], I did some algebra and obtained the following formula:</p>
  
  <pre><code>x = U \ ( L \ (Rs.*b[p]) )
  ipermute!(x,q)
  </code></pre>
  
  <p>This formula matched with the default F\b solver in Julia when the matrix is dense but the result is off when the matrix is sparse. Does anyone know why?</p>