# Smallest Eigenvalue of a Moler Matrix \[Again\]

**URL:** <https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix-again/21112>\
**Category:** Numerics\
**Created:** [February 23, 2019, 2:54pm UTC](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix-again/21112 "2019-02-23T14:54:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hans\_W\_Borchers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hans_w_borchers/32/8481_2.png) [@Hans\_W\_Borchers](https://discourse.julialang.org/u/Hans_W_Borchers)\
**Post date:** [February 23, 2019, 2:54pm UTC](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix-again/21112/1 "2019-02-23T14:54:25Z")

</div>

I am referring to help I received from Andreas Noack 10 months ago.  
[https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix/10510](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix/10510)  
I wanted to compute the smallest eigenvalue of Moler matrices with high precision. The example was a Moler matrix of dimension 100.

```
using MatrixDepot
A = matrixdepot("moler", 100);
eigmin(A)
## 2.7755575615628914e-16

```

The smallest eigenvalue is by far not correct. The proposed solution was to convert `A` to a matrix of “big” numbers.

```
using LinearAlgebra
eigvals(Hermitian(big.(A)))

```

All this was running smoothly with Julia version 0.6, using the _LinearAlgebra_ package at that time. Now when I repeat the calculations with Julia 1.1 there is an error saying

```
eigvals(Hermitian(big.(A)))
## ERROR: MethodError: no method matching 
## eigvals!(::Hermitian{BigFloat,Array{BigFloat,2}})

```

Has this feature of `LinearAlgebra.eigvals()` handling big numbers been dropped when integrating the package into Base Julia? What else can/should I do?

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 23, 2019, 3:08pm UTC](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix-again/21112/2 "2019-02-23T15:08:31Z")

</div>

This functionality has, like many others, been moved out of Base into a separate package. In your case the package is [GenericLinearAlgebra.jl](https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl).

You can simply `] add GenericLinearAlgebra` and `using GenericLinearAlgebra` and everything should work as expected.

---

<div class="post-metadata">

**Author:** ![Hans\_W\_Borchers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hans_w_borchers/32/8481_2.png) [@Hans\_W\_Borchers](https://discourse.julialang.org/u/Hans_W_Borchers)\
**Post date:** [February 26, 2019, 12:09pm UTC](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix-again/21112/3 "2019-02-26T12:09:12Z")

</div>

Thanks a lot.  
How could I have known without asking on this site?

‘GenericLinearAlgebra’ is not known on the “Registered Packages” page on _[julialang.org](http://julialang.org)_, nor on “Julia Observer” in the categories ‘Mathematics’, ‘LinearAlgebra’, ‘Numerical Linear Algebra’, or ‘Numerical Analysis’.

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [February 26, 2019, 12:16pm UTC](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix-again/21112/4 "2019-02-26T12:16:17Z")

</div>

Just use Julia v0.7 and you will get a deprecation warning.

Although I am not sure how to produce a deprecation warning specifically mentioning `GenericLinearAlgebra`.

Anyways, I use a docker image for it, for example:

```julia
░ tgal@staticbox:~
░ 13:15:46 > docker run -it julia:0.7
               _
   _ _ _(_)_ | A fresh approach to technical computing
  (_) | (_) (_) | Documentation: https://docs.julialang.org
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 0.7.0 (2018-08-08 06:46 UTC)
 _/ |\ __'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu

julia> eigvals()
WARNING: Base.eigvals is deprecated: it has been moved to the standard library package `LinearAlgebra`.
Add `using LinearAlgebra` to your imports.
 in module Main

```

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 26, 2019, 12:27pm UTC](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix-again/21112/5 "2019-02-26T12:27:32Z")

</div>

I don’t think that 0.7 would have helped in this case. The warnings/error message one gets isn’t indicating GenericLinearAlgebra at all.

@Hans_W_Borchers Unfortunately I don’t think you could have known (unless you would’ve worked through the corresponding github issues). Julia 1.0 isn’t very old and some moves of features haven’t been documented properly. Basically the issue is that the documentation of these features doesn’t belong into the Julia docs anymore - since the features are in packages now - and hence isn’t easily accessible anymore. This is a general problem. What we really need is a tool that allows one to search not only in the Julia docs but docs of some important packages as well. I believe some people are working on it. I’m not sure how intensively though.

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [February 26, 2019, 12:34pm UTC](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix-again/21112/6 "2019-02-26T12:34:49Z")

</div>

Yes you are right, but maybe the Docker hint is something to pick up 😉

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 26, 2019, 12:43pm UTC](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix-again/21112/7 "2019-02-26T12:43:12Z")

</div>

Turns out the explanation in my accepted answer isn’t quite correct - although the proposed solution is correct. I assumed this feature was in Base but, in fact, never was. In the discourse thread you linked it was suggested to use an **external** package `LinearAlgebra.jl`. In version 0.7 Julia got a `LinearAlgebra` standard library which, although identical in name, was different in functionality. The external package `LinearAlgebra.jl` was renamed to `GenericLinearAlgebra.jl` which is more precise and avoids the name overlap.

Hence, you could have known by just clicking the old link in the linked discourse thread again. You would’ve then noticed that the name of the package changed.
