LinearAlgebra[Modular][Basis] - compute Basis and Nullspace mod m
|
Calling Sequence
|
|
Basis(m, A, orient, basis, nullsp)
|
|
Parameters
|
|
m
|
-
|
modulus
|
A
|
-
|
mod m Matrix or list or set of mod m Vectors
|
orient
|
-
|
orientation of Vectors in mod m Matrix
|
basis
|
-
|
output format of basis Vectors
|
nullsp
|
-
|
output format of nullspace Vectors
|
|
|
|
|
Description
|
|
•
|
The Basis function computes a basis of the set of Vectors described by A, and returns that basis and the nullspace.
|
•
|
The orient parameter is specified if A is a mod m Matrix. It indicates to the Basis command whether the vectors of the input Matrix are in rows (orient=row) or columns (orient=column).
|
•
|
The basis and nullsp parameters indicate the format in which the respective Vectors are returned by Basis. They can be any of the following values:
|
|
|
false
|
no output
|
row
|
list of mod m row vectors
|
column
|
list of mod m column vectors
|
Matrix[row]
|
mod m Matrix with vectors in the rows
|
Matrix[column]
|
mod m Matrix with vectors in the columns
|
|
|
|
|
•
|
If neither basis or nullsp are false, both the basis and nullspace Vectors are returned as a two element sequence. If both are false, an error results.
|
|
For example, if Basis is called with basis=false and nullsp=column, the output would be a list of column Vectors for the nullspace.
|
•
|
The Basis command works with a copy of the input data, using the MatBasis command to perform the computation, so if data storage or efficiency are a concern, the MatBasis command should be used.
|
•
|
This command is part of the LinearAlgebra[Modular] package, so it can be used in the form Basis(..) only after executing the command with(LinearAlgebra[Modular]). However, it can always be used in the form LinearAlgebra[Modular][Basis](..).
|
|
|
Examples
|
|
Three dimensional basis, two dimensional nullspace, and Vector input.
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
Check orthogonality.
>
|
|
| (4) |
Matrix input, request nullspace only.
>
|
|
| (5) |
>
|
|
| (6) |
Check orthogonality.
>
|
|
| (7) |
For the same problem, request the nullspace as Matrix.
>
|
|
| (8) |
Check orthogonality.
>
|
|
| (9) |
|
|
Download Help Document
Was this information helpful?