ReversalMatrix
Returns a reversal matrix.
Syntax
-
ReversalMatrix(n)-
nis a positive integer
-
Description
If n is a positive integer, then ReversalMatrix(n) returns the n-dimensional reversal matrix, that is, the n×n matrix with 1s on the antidiagonal and 0s everywhere else.
Examples
ReversalMatrix(4)
⎛0 0 0 1⎞ ⎜0 0 1 0⎟ ⎜0 1 0 0⎟ ⎝1 0 0 0⎠