# Incomplete LU factorisation

**URL:** https://discourse.julialang.org/t/incomplete-lu-factorisation/4951
**Category:** New to Julia
**Created:** [July 19, 2017, 6:08pm UTC](https://discourse.julialang.org/t/incomplete-lu-factorisation/4951 "2017-07-19T18:08:17Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)
#### Post date: [July 19, 2017, 6:08pm UTC](https://discourse.julialang.org/t/incomplete-lu-factorisation/4951/1 "2017-07-19T18:08:17Z")

</div>

Hi,

I wonder if there is an incomplete LU factorization like ilu in MATLAB. It would be useful to speed up iterative solver for example.

Ultimately, a matrix free version would be incredibly useful.

Thank you for your help.

---

<div class="post-metadata">

### Author: ![jeffwong](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffwong/32/1276_2.png) [@jeffwong](https://discourse.julialang.org/u/jeffwong)
#### Post date: [July 22, 2017, 5:32am UTC](https://discourse.julialang.org/t/incomplete-lu-factorisation/4951/2 "2017-07-22T05:32:33Z")

</div>

I have implemented this in R before, I’ll give it a try in Julia

---

<div class="post-metadata">

### Author: ![dpo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpo/32/3335_2.png) [@dpo](https://discourse.julialang.org/u/dpo)
#### Post date: [July 23, 2017, 2:09am UTC](https://discourse.julialang.org/t/incomplete-lu-factorisation/4951/3 "2017-07-23T02:09:54Z")

</div>

Dense or sparse?

I have Julia implementation of a limited-memory sparse modified signed Cholesky here: [https://github.com/JuliaSmoothOptimizers/LLDL.jl](https://github.com/JuliaSmoothOptimizers/LLDL.jl). The modifications allow to compute an incomplete factorization of any symmetric sparse matrix as L D L^T where L is unit lower triangular and D is **diagonal** and indefinite. (This isn’t Bunch-Kaufman.) The input matrix will be shifted if necessary until the incomplete factorization exists.

It may be possible to generalize it and make it do incomplete LU.

---

<div class="post-metadata">

### Author: ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)
#### Post date: [July 23, 2017, 8:20pm UTC](https://discourse.julialang.org/t/incomplete-lu-factorisation/4951/4 "2017-07-23T20:20:16Z")

</div>

That looks interesting. Any chance to get a “Matrix Free” version?

---

<div class="post-metadata">

### Author: ![dpo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpo/32/3335_2.png) [@dpo](https://discourse.julialang.org/u/dpo)
#### Post date: [July 23, 2017, 9:18pm UTC](https://discourse.julialang.org/t/incomplete-lu-factorisation/4951/5 "2017-07-23T21:18:04Z")

</div>

What do you mean by that?

---

<div class="post-metadata">

### Author: ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)
#### Post date: [July 24, 2017, 5:57am UTC](https://discourse.julialang.org/t/incomplete-lu-factorisation/4951/6 "2017-07-24T05:57:04Z")

</div>

I mean when you are only provided with a function that evaluates the linear operator on vectors.

---

<div class="post-metadata">

### Author: ![dpo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpo/32/3335_2.png) [@dpo](https://discourse.julialang.org/u/dpo)
#### Post date: [July 24, 2017, 2:55pm UTC](https://discourse.julialang.org/t/incomplete-lu-factorisation/4951/7 "2017-07-24T14:55:49Z")

</div>

Typically, you need the explicit matrix if you want an incomplete factorization, were it only to compute proper row and column scaling. If you forgo the scaling, you could technically generate the matrix one column at a time but it will still cost you n operator-vector products in the end. That would require major changes to the code though.
