Click or drag to resize

Triangles And Trapezoids

Hereinafter the following convention is used:

  • VSmall Greek – small Greek letters are used to denote scalars;

  • VSmall Latin – small Latin letters are used to denote vectors;

  • VCapital Latin – capital Latin letters are used to denote matrices.

This topic contains the following sections:

Trapezoids

Trapezoid is the matrix of the same size with all elements lower/upper the main diagonal equal to zero.

Let us show this operations on matrix A of size 3-by-4:

MGivenNM

and of size 4-by-3:

MGivenMN

Operation

Description

Performance

lower trapezoid

Returns a new matrix of the same size containing the lower trapezoid of this matrix.

In case of 3-by-4 matrix:

MLow TrNM

In case of 4-by-3 matrix:

MLow TrMN

methodGetLowerTrapezoid

upper trapezoid

Returns a new matrix of the same size containing the upper trapezoid of this matrix.

In case of 3-by-4 matrix:

MUp TrNM

In case of 4-by-3 matrix:

MUp TrMN

methodGetUpperTrapezoid

strictly lower trapezoid

Returns a new matrix of the same size containing the strictly lower trapezoid of this matrix (trapezoid with main diagonal elements equal to zero).

In case of 3-by-4 matrix:

MLow Strict TrNM

In case of 4-by-3 matrix:

MLow Strict TrMN

methodGetStrictlyLowerTrapezoid

strictly upper trapezoid

Returns a new matrix of the same size containing the strictly upper trapezoid of this matrix (trapezoid with main diagonal elements equal to zero).

In case of 3-by-4 matrix:

MUp Strict TrNM

In case of 4-by-3 matrix:

MUp Strict TrMN

methodGetStrictlyUpperTrapezoid

Triangles

Triangle is the square matrix with all elements lower/upper the main diagonal equal to zero.

Let us show this operations on matrix A of size 3-by-4:

MGivenNM

and of size 4-by-3:

MGivenMN

The result will be identical for such two matrices.

Operation

Description

Performance

lower triangle

Returns a new square matrix containing the lower triangle of this matrix.

MLow Tri

methodGetLowerTriangle

upper triangle

Returns a new square matrix containing the upper triangle of this matrix.

MUp Tri

methodGetUpperTriangle

strictly lower triangle

Returns a new square matrix containing the strictly lower triangle of this matrix (triangle with main diagonal elements equal to zero).

MLow Strict Tri

methodGetStrictlyLowerTriangle

strictly upper triangle

Returns a new square matrix containing the strictly upper triangle of this matrix (triangle with main diagonal elements equal to zero).

MUp Strict Tri

methodGetStrictlyUpperTriangle

See Also