Calculator Input
Enter a square matrix. The 2 x 2 mode uses a, b, c, and d only.
Formula Used
For a 2 x 2 matrix A = [a b; c d], the trace is T = a + d.
The determinant is D = ad - bc. The characteristic polynomial is λ² - Tλ + D.
The discriminant is Δ = T² - 4D. It identifies the eigenvalue pattern.
For a 3 x 3 matrix, I1 = trace(A). I2 = ae + ai + ei - bd - cg - fh.
The third invariant is I3 = det(A). The polynomial is λ³ - I1λ² + I2λ - I3.
The residual checks the Cayley Hamilton identity. A small value means the formulas agree numerically.
How to Use This Calculator
Select the matrix size first. Enter values in the labeled fields.
Use 2 x 2 mode for four entries only. Use 3 x 3 mode for all nine entries.
Set decimal precision if you need shorter or longer results. Keep tolerance small for residual checks.
Press calculate to view the result above the form. Use CSV or PDF buttons to download the same calculation.
Example Data Table
| Mode |
Matrix |
Trace |
Determinant |
Characteristic polynomial |
| 2 x 2 |
[2, 1; 3, 4] |
6 |
5 |
λ² - 6λ + 5 |
| 2 x 2 |
[1, -2; 2, 1] |
2 |
5 |
λ² - 2λ + 5 |
| 3 x 3 |
[2,1,0; 3,4,1; 2,-1,3] |
9 |
20 |
λ³ - 9λ² + 20λ - 18 |
| 3 x 3 |
[1,0,2; -1,3,1; 0,2,4] |
8 |
17 |
λ³ - 8λ² + 17λ - 10 |
Invariant Calculator Guide
What Invariants Mean
An invariant is a value that stays the same after a permitted change. This tool focuses on matrix invariants. These values help you compare systems without depending on a chosen basis.
For a square matrix, the trace and determinant are key invariants. The trace is the sum of diagonal entries. The determinant measures scaling and orientation. A second principal invariant is also used for three by three matrices. It links directly with the characteristic polynomial.
Formula Insight
This calculator supports two by two and three by three matrices. It returns trace, determinant, polynomial terms, norm checks, and a Cayley Hamilton residual. The residual should be near zero. Small nonzero values may appear because decimal arithmetic is rounded.
Use the two by two mode for quick linear maps. It can also show real or complex eigenvalue forms. Use the three by three mode when you need richer structure. The second invariant helps form the cubic polynomial. These results are useful in algebra, physics, control work, and data models.
Practical Use
The calculator is not a proof engine. It gives numerical support and organized formulas. You should still review assumptions. Matrix entries must represent the same ordered basis. Changing row order changes the matrix. Similarity transformations preserve the listed characteristic invariants.
To use the form, choose the matrix size. Enter each value carefully. Decimals and negative numbers are allowed. Press the calculate button. The answer appears below the header and above the form. Review the formulas beside each result. Then download a CSV file for spreadsheets. You may also create a compact PDF report.
Good Review Habits
The example table shows typical inputs and outputs. Try those rows first. They help confirm your layout and expected results. After that, enter your own matrix. Compare trace and determinant before and after a similarity change. Matching values suggest the same core linear behavior. Different values show the matrices are not similar under ordinary rules.
For advanced checks, use exact fractions when possible. Rounded decimals can hide structure. A determinant near zero may mean singular behavior. It may also mean the input was rounded. Always compare results with context. Save each report with a name. That makes review easier.
FAQs
What is an invariant?
An invariant is a value that remains unchanged under a defined transformation. For matrices, trace, determinant, and characteristic coefficients often stay fixed under similarity changes.
Which matrix sizes are supported?
This calculator supports 2 x 2 and 3 x 3 matrices. The 2 x 2 mode uses four entries. The 3 x 3 mode uses all nine entries.
What does the determinant show?
The determinant shows signed scaling for a linear map. A zero determinant means the matrix is singular and cannot be inverted under standard matrix rules.
What does the trace show?
The trace is the sum of diagonal entries. It is also the sum of eigenvalues when counted with algebraic multiplicity.
What is the characteristic polynomial?
It is a polynomial built from the matrix. Its roots are eigenvalues. Its coefficients are important invariants for square matrices.
Why is there a residual check?
The residual tests the Cayley Hamilton identity numerically. A very small residual means the computed invariants fit the matrix well.
Can decimals cause small errors?
Yes. Decimal arithmetic can create tiny rounding differences. Increase precision or use exact values when mathematical proof is required.
Can I export the results?
Yes. Use the CSV button for spreadsheet work. Use the PDF button for a compact report that includes metrics, values, and formulas.