Rational Canonical Form Calculator

Enter matrix values and inspect canonical blocks quickly. Compare characteristic, minimal, and invariant polynomials clearly. Download organized results for lessons, homework, or research review.

Matrix Calculator

Example Data Table

Example Matrix Expected Structure Use Case
Companion Style [0 -1; 1 0] One quadratic block Rotation model
Scalar Matrix [2 0; 0 2] Two linear blocks Repeated eigenvalue
Three Order Matrix [0 0 -6; 1 0 11; 0 1 -6] One cubic block Polynomial companion form

Formula Used

The calculator uses the characteristic polynomial, minimal polynomial, invariant factors, and companion matrices.

For a square matrix A, the characteristic polynomial is det(xI − A).

For 2 × 2 matrices, it is x² − tr(A)x + det(A).

For 3 × 3 matrices, it is x³ − tr(A)x² + c₂x − det(A).

Here c₂ = ((tr(A))² − tr(A²)) / 2.

The minimal polynomial is the smallest monic polynomial m(x) with m(A) = 0.

Each invariant factor creates one companion block. The block diagonal matrix is the rational canonical form.

How to Use This Calculator

  1. Select a 2 × 2 or 3 × 3 matrix.
  2. Enter every matrix value in row order.
  3. Choose the number of displayed decimal places.
  4. Press the calculate button.
  5. Review the characteristic polynomial and minimal polynomial.
  6. Check the invariant factors and companion blocks.
  7. Download the result as CSV or PDF.

Understanding the Tool

Rational canonical form is a structured matrix model for a linear operator. It works over the base field, so it avoids forcing eigenvalues to appear. This makes it useful when roots are irrational, complex, or simply not needed. The calculator focuses on small square matrices, where exact classroom checking is practical.

Why It Matters

Two matrices are similar when they represent the same map in different bases. Rational canonical form gives one standard representative for that similarity class. The blocks come from invariant factors. These factors divide one another, and their product equals the characteristic polynomial. The largest factor is the minimal polynomial.

What the Calculator Does

The form reads the selected matrix, builds powers of the matrix, and searches for the shortest monic polynomial that sends the matrix to zero. That polynomial is the minimal polynomial. The script also computes the characteristic polynomial through trace and determinant identities. It then selects companion blocks and places them along the diagonal. The displayed matrix is the rational canonical form.

Practical Input Tips

Use integers or decimals. Fractions should be converted before entry. Keep values moderate when possible. Very large values can make floating comparison harder. The precision box controls the printed output. It does not change the mathematical method. It only changes how numbers appear in the report.

Reading the Results

A companion block stores coefficients of a monic polynomial. If the minimal polynomial has full degree, the result is one companion matrix. If the matrix is scalar, the form becomes repeated one by one blocks. For a three by three matrix with a quadratic minimal polynomial, the output uses one linear block and one quadratic block.

Study Uses

Students can compare traces, determinants, polynomials, and block structure in one place. Teachers can prepare examples quickly. Researchers can test small transformations before moving to a computer algebra system. Always verify high stakes work with exact symbolic software when entries involve fractions, parameters, or sensitive numerical rounding.

Common Limits

The calculator is designed for two and three order matrices. That keeps reports readable and dependable. It explains the algebraic path, not only the final matrix. For larger dimensions, use the same ideas with symbolic systems and exact rational arithmetic.

FAQs

What is rational canonical form?

It is a standard block matrix similar to the original matrix. Its blocks come from invariant factors, not directly from eigenvectors.

Why is it called rational?

It can be built over the base field. It does not require factoring the characteristic polynomial into linear factors.

What matrix sizes are supported?

This page supports 2 × 2 and 3 × 3 matrices. That keeps calculations clear and suitable for study checks.

Can I enter fractions?

Convert fractions to decimals before entry. For exact fraction work, verify results with symbolic algebra software.

What is the minimal polynomial?

It is the smallest monic polynomial that becomes the zero matrix when the matrix is substituted into it.

What is a companion block?

It is a matrix built from polynomial coefficients. Each invariant factor produces one companion block.

Why does the result use blocks?

The blocks describe cyclic parts of the linear transformation. Together, they form a canonical representative.

Is this enough for formal proof?

It helps with learning and checking examples. For formal work, also show the invariant factor reasoning.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.