Delimiter option: square brackets. Chainable, persistent.
Delimiter option: braces. Chainable, persistent.
Delimiter option: double vertical bars. Chainable, persistent.
Delimiter option: round brackets (default). Chainable, persistent.
Delimiter option: single vertical bars, as for a determinant. Chainable, persistent.
The columns, as an array of arrays (copies of the values).
Number of rows and columns, as {rows, cols}.
Text output such as ((1,2),(3,4)). The outer brackets follow the delimiter option, and a partition adds a |.
This is the format read by parse.
The rows, as an array of arrays (copies of the values).
LaTeX output: a pmatrix environment by default, one row per line. With a partition (withPartition),
an array with a vertical bar. An empty matrix gives an empty string.
The entries, as an array of rows (copies of the values).
Add a matrix of the same dimensions, term by term.
Returns element at position (i, j), or null if the index is out of bounds.
True when both matrices have the same dimensions.
True when the matrix is square and its determinant is not zero.
True when the number of columns of this matrix equals the number of rows of matrix.
A full duplicate of the values and of the partition. The delimiter option (asBmatrix...) is not kept.
The cofactor of the entry at row, column: the determinant of the matrix without that row and column,
times (-1)^(row+column).
Copy the values and the partition of another matrix into this one.
ProtectedcreateOptionalvalue: InputValue<Fraction>ProtectedcreateReturns a new Matrix instance; as this satisfies the abstract contract for subclasses
Determinant, by cofactor expansion along the first row.
All the values in a single array, row by row.
Call callback(value, row, column) for each entry. The entries are the real objects: they can be modified.
Returns true if the augmented matrix [A|b] has a consistent system of
equations. A row [0…0 | c≠0] after row reduction signals inconsistency.
Always returns true when no partition has been set.
True when both matrices have the same dimensions and equal entries.
True for an identity matrix.
True when there are as many rows as columns.
True when every entry is zero.
Multiply by a scalar (every entry), or by a matrix (this × value, which replaces the content).
Set the diagonal to one and every other entry to zero.
Change the sign of every entry.
Replace the content with a display string ("((1,2),(3,4))"), an array of rows, or vectors (one per column).
Returns the rank of this matrix — the number of non-zero rows after reduction to row echelon form.
Reduce every entry.
Returns a new matrix in reduced row echelon form (Gauss-Jordan). Each pivot column has exactly one non-zero entry (value 1). Does not modify the receiver.
Returns a new matrix in row echelon form (forward Gauss elimination). The matrix is upper-triangular with each pivot normalised to 1. Does not modify the receiver.
Replace the entry at row, column.
Subtract a matrix of the same dimensions, term by term.
Returns a new matrix that is the transpose of this one. Does not modify the receiver.
Set every entry to zero.
StaticfromBuild a zero matrix. Without cols, the matrix is square.
Optionalcols: numberStaticfromBuild a matrix from its display string, such as "((1,2),(3,4))".
StaticfromStaticfrom
A matrix of Fractions. Built from a string (
"((1,2),(3,4))"), an array of rows, or a number of rows and columns (a zero matrix). The operations are those of AbstractMatrix.Example