Documentation Center

  • Trial Software
  • Product Updates


Frobenius form of a matrix

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.


linalg::frobeniusForm(A, <All>)


linalg::frobeniusForm(A) returns the Frobenius form of the matrix A, also called the Rational Canonical form of A.

linalg::frobeniusForm(A, All) computes the Frobenius form R of A and a transformation matrix P such that PRP- 1.

The Frobenius form as computed by linalg::frobeniusForm is unique (see below).

The component ring of A must be a field, i.e., a domain of category Cat::Field.


Example 1

The Frobenius form of the following matrix over :

A := Dom::Matrix(Dom::Complex)( 
  [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

is the matrix:

R := linalg::frobeniusForm(A)

The transformation matrix P can be selected from the list [R, P], which is the result of linalg::frobeniusForm with option All:

P := linalg::frobeniusForm(A, All)[2]

We check the result:

P * R * P^(-1)



A square matrix of a domain of category Cat::Matrix



Returns the list [R, P] with the Frobenius form R of A and a transformation matrix P such that A = PRP- 1.

Return Values

Matrix of the same domain type as A, or the list [R, P] when the option All is given.


The Frobenius form of a square matrix A is the matrix


where R1, …, Rr are known as companion matrices and have the form:


In the last column of the companion matrix Ri, you see the coefficients of its minimal polynomial in ascending order, i.e., the polynomial mi := Xni + ani - 1Xni - 1 + … + a1X + a0 is the minimal polynomial of the matrix Ri.

For these polynomials the following holds: mi + 1 divides mi for i = 1, …, r - 1, and the product of all mi for i = 1, …, r gives a factorization of the characteristic polynomial of the matrix A. The Frobenius form defined in this way is unique.


Reference: P. Ozello: Calcul exact des formes de Jordan et de Frobenius d'une matrice, pp. 30–43. Thèse de l'Universite Scientifique Technologique et Medicale de Grenoble, 1987

See Also

MuPAD Functions

Was this topic helpful?