Description Usage Arguments Value Examples
View source: R/check_commute.R
This function generates symbolic matrices representing those
that might commute with a particular matrix M (i.e., AM = MA
). This only
applies to square matrices; passing a nonsquare matrix will cause an error.
This function returns a matrix of the input matrix's dimension, with each
element consisting of an equation, where the left side is that element's
value multiplying on the left and the right its value multiplying on the
right. All matrices whose elements satisfy all the equations commute with
M
.
All n x n matrices trivially commute with the corresponding identity and zero matrix, as well as the inverse, if it exists.
1 2 3 4 5 6 7 |
m |
An n x n matrix of dimension greater than 1 whose commutativity will be tested. |
syms |
Character vector of symbols to use to represent the commuting matrix
A. Must have the same dimensions as @param m. Defaults to the first |
latex |
is false. |
sink |
Argument passed on to |
An n x n matrix, where each element is an equation whose left-hand
side represents that element's value in AM
and the right-hand side its value
in MA
.
1 2 3 4 | check_commute(matrix(1:4, nrow = 2))
#Automatically drops zeroed terms
m <- matrix(sample(-1:1, 9, replace = TRUE), nrow = 3)
check_commute(m)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.