Returns the smallest eigenvalue of A.


In the Julia programming language, the function eigmin(A) returns the smallest eigenvalue of matrix A.

julia> A = [1 2; 3 4];
julia> eigmin(A)

Here are some examples of how to use eigmin:

  1. Find the smallest eigenvalue of a matrix:

    julia> M = [5 2; 1 -3];
    julia> eigmin(M)

    This example computes the smallest eigenvalue of the matrix M.

  2. Calculate the smallest eigenvalue of a symmetric matrix:

    julia> A = [4 1 2; 1 2 5; 2 5 3];
    julia> eigmin(A)

    It computes the smallest eigenvalue of the symmetric matrix A.

  3. Handle edge case with a 1x1 matrix:
    julia> B = [7];
    julia> eigmin(B)

    When the matrix is a scalar (1x1 matrix), the function returns the value itself.

Common mistake example:

julia> C = [1 2; 2 1];
julia> eigmin(C)
ERROR: LinearAlgebraException("eigmin only supports Hermitian or symmetric matrices")

In this example, the function throws an error because eigmin only supports Hermitian or symmetric matrices. It's important to ensure that the matrix provided is of the correct type to avoid such errors.

See Also

abs2, beta, binomial, ceil, cell, cross, ctranspose, ctranspose!, cummin, cumprod, cumprod!, cumsum, cumsum!, cumsum_kbn, div, divrem, eigfact, eigfact!, eigmin, eps, erf, erfc, erfcinv, erfcx, erfi, erfinv, exp, exp10, exp2, expm1, exponent, factor, factorial, factorize, floor, gcd, invmod, log, log10, log1p, log2, logspace, max, min, mod, mod1, modf, next, nextpow, nextprod, num, primes, primesmask, prod, realmin, sqrt, sum!, sumabs, sumabs!, sumabs2, sumabs2!,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field

Checking you are not a robot: