# Help with LU factorization

**URL:** <https://discourse.julialang.org/t/help-with-lu-factorization/39911>\
**Category:** General Usage\
**Tags:** question\
**Created:** [May 21, 2020, 10:03pm UTC](https://discourse.julialang.org/t/help-with-lu-factorization/39911 "2020-05-21T22:03:56Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![A.U.M](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@A.U.M](https://discourse.julialang.org/u/A.U.M)\
**Post date:** [May 22, 2020, 1:59pm UTC](https://discourse.julialang.org/t/help-with-lu-factorization/39911/21 "2020-05-22T13:59:32Z")

</div>

> [@dpsanders](#):
>
> argmax

Thank i got it now. as i know indmax Returns the index of the maximum element in a collection so when you said it’s now findmax i thought that it do the same thing but it seems that it returns the maximum element of the collection `itr` and its index.(not the index only)

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [May 22, 2020, 2:14pm UTC](https://discourse.julialang.org/t/help-with-lu-factorization/39911/22 "2020-05-22T14:14:04Z")

</div>

> [@A.U.M](#):
>
> Thanks. it works but i got different error

Look at the documentation for `findmax` by typing `?findmax`. You’ll see that it returns _both_ the maximum value and the corresponding index. If you just want the index, do `findmax(abs.(U[(k-1):n,k-1]))[2]` or `argmax(abs.(U[(k-1):n,k-1]))`.

In general, you should make some effort to read the documentation and debug things yourself before posting.

[Previous page](https://discourse.julialang.org/t/help-with-lu-factorization/39911.md?page=1)
