# eigvals!(A) vs eigvals!(A, B)?

**URL:** <https://discourse.julialang.org/t/eigvals-a-vs-eigvals-a-b/1734>\
**Category:** Numerics\
**Tags:** question\
**Created:** [January 27, 2017, 11:07pm UTC](https://discourse.julialang.org/t/eigvals-a-vs-eigvals-a-b/1734 "2017-01-27T23:07:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [January 27, 2017, 11:07pm UTC](https://discourse.julialang.org/t/eigvals-a-vs-eigvals-a-b/1734/1 "2017-01-27T23:07:03Z")

</div>

What is the difference between `eigvals!(A)` and `eigvals!(A,B)`?

I understand that `eigvals!(A)` will replace `A` with a “scaled” version, where rows and columns are more equal in norm and the matrix becomes closer to upper triangular (and maybe other stuff). This is documented.

I did not find `eigvals!(A,B)` in the documentation. What is `B` used for?

---

<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:** [January 27, 2017, 11:41pm UTC](https://discourse.julialang.org/t/eigvals-a-vs-eigvals-a-b/1734/2 "2017-01-27T23:41:16Z")

</div>

> [@e3c6](#):
>
> I did not find eigvals!(A,B) in the documentation. What is B used for?

Similar to `eigvals(A,B)` and `eig(A,B)`, it solves the generalized eigenproblem `Ax=λBx`.
