Previous Page Next Page Contents

linalg::smithForm -- Smith canonical form of a matrix

Introduction

linalg::smithForm(A) computes the Smith canonical form of the n-dimensional square matrix A, i.e., an n x n diagonal matrix S such that S[i-1,i-1] divides S[i,i] for i=2..n.

Call(s)

linalg::smithForm(A)

Parameters

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

Returns

a matrix of the same domain type as A.

Related Functions

linalg::frobeniusForm, linalg::hermiteForm, linalg::jordanForm

Details

Example 1

We define a matrix over the integers:

>> MatZ := Dom::Matrix(Dom::Integer):
   A := MatZ([[9, -36, 30], [-36, 192, -180], [30, -180, 180]]) 
                           +-                 -+
                           |   9,   -36,  30   |
                           |                   |
                           |  -36,  192, -180  |
                           |                   |
                           |   30, -180,  180  |
                           +-                 -+

The Smith canonical form of A is then given by:

>> linalg::smithForm(A)
                              +-           -+
                              |  3,  0,  0  |
                              |             |
                              |  0, 12,  0  |
                              |             |
                              |  0,  0, 60  |
                              +-           -+

Example 2

We compute the Smith canonical form of a matrix over a ring of polynomials:

>> MatPoly := Dom::Matrix(Dom::DistributedPolynomial([x], Dom::Rational)):
   B := MatPoly(
     [[-(x - 3)^2*(x - 2),(x - 3)*(x - 2)*(x - 4)],
      [(x - 3)*(x - 2)*(x - 4),-(x - 3)^2*(x - 4)]
   ])
          +-                                                   -+
          |     3      2                 3      2               |
          |  - x  + 8 x  - 21 x + 18,   x  - 9 x  + 26 x - 24   |
          |                                                     |
          |    3      2                  3       2              |
          |   x  - 9 x  + 26 x - 24,  - x  + 10 x  - 33 x + 36  |
          +-                                                   -+

The Smith canonical form of the matrix B is the following matrix:

>> linalg::smithForm(B)
                    +-                              -+
                    |  x - 3,           0            |
                    |                                |
                    |          3      2              |
                    |    0,   x  - 9 x  + 26 x - 24  |
                    +-                              -+

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000