Rank - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


LinearAlgebra[Modular]

  

Rank

  

compute the rank of a mod m Matrix

  

RankProfile

  

compute the rank profile of a square mod m Matrix

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Rank(m, A, meth)

RankProfile(m, A, meth)

Parameters

m

-

modulus

A

-

mod m Matrix

meth

-

(optional) keyword for choice of method

Description

• 

The Rank function returns the rank of the input mod m Matrix, while the RankProfile function returns a list of 'rank' elements describing the rank profile of the input mod m Matrix.

  

The rank profile list is simply a list of the location of the first non-zero entry in each nontrivial row in the row reduced form of the Matrix.

• 

The following methods are available:

REF

(default) Compute using standard row-reduction (Row Echelon Form)

inplaceREF

Compute using standard row-reduction in-place in the input Matrix

RET

Compute using a Row Echelon Transformation approach

inplaceRET

Compute using a Row Echelon Transformation in-place in the input Matrix

• 

Note that the two inplace methods available will destroy the data in the input Matrix, while the other two methods will generate a copy of the Matrix in which to perform the computation.

• 

The RET methods are likely to be faster for large matrices, but may fail if the modulus is composite.

• 

These commands are part of the LinearAlgebra[Modular] package, so they can be used in the form Rank(..) and RankProfile(..) only after executing the command with(LinearAlgebra[Modular]).  However, they can always be used in the form LinearAlgebra[Modular][Rank](..) and LinearAlgebra[Modular][RankProfile](..).

Examples

withLinearAlgebraModular:

p97

p97

(1)

MModp,2,11,1,80,31,16,27,36,8,32,32,31,25,4,90,63,integer

M2111803116273683232312549063

(2)

Rankp,M,RankProfilep,M

4,1,2,3,4

(3)

With an inplace method the input Matrix is altered

Rankp,M,inplaceREF,M

4,1544940015826001350001

(4)

And a case that is not full rank

MModp,2,2,1,80,31,31,27,36,8,8,32,31,25,25,90,63,integer

M221803131273688323125259063

(5)

RankProfilep,M

1,3,4

(6)

Rankp,M

3

(7)

A composite example where the RET method is unsuccessful

MMatrix3,2,2,3,datatype=integer

M3223

(8)

Rank6,M,REF

2

(9)

Rank6,M,RET

Error, (in LinearAlgebra:-Modular:-RowEchelonTransform) modulus is composite

Note that this is only because this is a case where the row echelon form exists, but the row echelon transform cannot be written in the required form.

See Also

LinearAlgebra/Details

LinearAlgebra[Modular]

LinearAlgebra[Modular][Create]

LinearAlgebra[Modular][RowEchelonTransform]

LinearAlgebra[Modular][RowReduce]