Eigenvalues of a Matrix

Decomposition & Spectral Methods DS practice problem on Onlearn.

Difficulty: medium.

Topics: Understanding Calculate Eigenvalues of a Matrix, Determinant, Characteristic Equation, Quadratic Formula, Identity Matrix, List Sorting, Linear Algebra, Numerical Methods, Mathematical Foundations, Computational Mathematics, Machine Learning Theory, Matrix Decompositions, Spectral Analysis, Characteristic Polynomials, Root Finding Algorithms, Algorithm Design.

Write a Python function that calculates the eigenvalues of a 2x2 matrix. The function should return a list containing the eigenvalues, sort values from highest to lowest.