# Mathematics > Linear Algebra Foundations > Linear Algebra Foundations #9 - Eigenvalues # Compute the Eigenvalues of the following 2x2 matrix. # # https://www.hackerrank.com/challenges/linear-algebra-fundamentals-9-eigenvalues/problem # # http://mathworld.wolfram.com/Eigenvalue.html Définition générale det(A-λI) = 0 Solution générale pour dim=2 λ = 1/2 [ (a11 + a22] ± sqrt(4 * a12 * a21 + (a11 - a22)^2) ] Solution avec numpy print(np.linalg.eigvals(np.matrix([[0, 1],[ -2, -3]]))) Solution calulée: A = [0 1] [-2 -3] λ = 1/2 * (-3 ± sqrt(-8+3^2)) ⟹ λ₁ = -4/2 = -2 ⟹ λ₂ = -2/2 = -1 Réponse: -2 -1