#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
⚡ FREE · STEP BY STEP

Cayley-Hamilton Calculator: Verify the Theorem, Find A⁻¹ and Aⁿ

Enter a square matrix to get its characteristic equation, A⁻¹ and powers of A.

  • ✅ Theorem verified
  • 🔄 A⁻¹ from the equation
  • ⚡ High powers of A

How to use the Cayley-Hamilton Theorem Calculator

  1. 1. Enter matrix AOne row per line, 2×2, 3×3 or 4×4. Fractions like 1/2 work.
  2. 2. Optionally pick a powerEnter m to write Aᵐ in terms of lower powers of A.
  3. 3. Read the workingSee the characteristic equation, A², A³, the zero-matrix check, A⁻¹ and Aᵐ.

What the Cayley-Hamilton theorem says

Every square matrix satisfies its own characteristic equation. If |A − λI| = 0 gives λⁿ + cₙ₋₁λⁿ⁻¹ + … + c₁λ + c₀ = 0, then Aⁿ + cₙ₋₁Aⁿ⁻¹ + … + c₁A + c₀I = 0. For a 3×3 matrix the equation is λ³ − S₁λ² + S₂λ − S₃ = 0, where S₁ is the trace, S₂ the sum of the 2×2 principal minors and S₃ = |A|.

Two uses follow. Multiplying by A⁻¹ gives A⁻¹ = −(1/c₀)(Aⁿ⁻¹ + cₙ₋₁Aⁿ⁻² + … + c₁I), so the inverse needs only powers of A. And any high power Aᵐ can be reduced to a combination of I, A, …, Aⁿ⁻¹ by dividing λᵐ by the characteristic polynomial.

Worked example

Take A = [[2, −1, 1], [−1, 2, −1], [1, −1, 2]]. The trace is 6, the principal minors add to 3 + 3 + 3 = 9 and |A| = 4, so the characteristic equation is λ³ − 6λ² + 9λ − 4 = 0. Computing A² = [[6, −5, 5], [−5, 6, −5], [5, −5, 6]] and A³ = [[22, −21, 21], …] shows A³ − 6A² + 9A − 4I = 0, verifying the theorem.

Then 4A⁻¹ = A² − 6A + 9I = [[3, 1, −1], [1, 3, 1], [−1, 1, 3]], so A⁻¹ = (1/4)[[3, 1, −1], [1, 3, 1], [−1, 1, 3]].

Good to know

If |A| = 0 then c₀ = 0 and A has no inverse, but the theorem still holds. To check the inverse another way, use the Gauss-Jordan calculator; for the roots of the characteristic equation, see the eigenvalue calculator.

Frequently asked questions

How do I verify the Cayley-Hamilton theorem?

Find the characteristic equation, replace λ by A and the constant c by cI, and compute. The result must be the zero matrix.

How is A⁻¹ found from the theorem?

Rearrange Aⁿ + … + c₁A + c₀I = 0 and multiply by A⁻¹: A⁻¹ = −(1/c₀)(Aⁿ⁻¹ + … + c₁I). It needs c₀ = ±|A| to be non-zero.

How does it give high powers like A⁴ or A¹⁰?

Dividing λᵐ by the characteristic polynomial leaves a remainder of degree less than n. The same remainder with A in place of λ equals Aᵐ.

Which sizes are supported?

2×2, 3×3 and 4×4 matrices, with exact fractions throughout.

Is this calculator free?

Yes. You fill a short form once when you see your first result, and other Uncodemy tools then open without the form. Everything is calculated in your browser.

More free tools

See all free tools