ArrayTools
LowerTriangle
return the lower triangular region of a Matrix
Calling Sequence
Parameters
Description
Examples
LowerTriangle(A)
LowerTriangle(A,k)
A
-
Matrix, Vector, Array, or scalar
k
(optional) integer
For a matrix A, the LowerTriangle(A) command returns a matrix R where R[i,j] = A[i,j] when R[i,j] is on or below the main diagonal of R. R[i,j] = 0, otherwise.
For a matrix A, the LowerTriangle(A,k) command returns a matrix R where R[i,j] = A[i,j] when R[i,j] is on or below the diagonal of R indexed by k. R[i,j] = 0 otherwise.
The diagonals of a matrix are indexed using signed integers, where the main diagonal has index 0. Superdiagonals are indexed with positive integers and subdiagonals are indexed with negative integers.
This function is part of the ArrayTools package, so it can be used in the short form LowerTriangle(..) only after executing the command with(ArrayTools). However, it can always be accessed through the long form of the command by using ArrayTools[LowerTriangle](..).
with⁡ArrayTools:
A≔Matrix⁡1,2,1,4,5,6,2,8,1
A≔121456281
LowerTriangle⁡A
100450281
LowerTriangle⁡A,1
120456281
LowerTriangle⁡A,−1
000400280
See Also
ArrayTools[Diagonal]
ArrayTools[UpperTriangle]
Download Help Document