WOLFRAM

LinearAlgebra`BLAS`
LinearAlgebra`BLAS`

TRMV

TRMV[ul,ts,dg,a,b]

computes the triangular matrix-vector multiplication opts[a].b and resets b to the result.

Details and Options

  • To use TRMV, you first need to load the BLAS Package using Needs["LinearAlgebra`BLAS`"].
  • The following arguments must be given:
  • ul
  • input string
  • upper/lower triangular string
  • ts
  • input string
  • transposition string
  • dg
  • input string
  • diagonal ones string
    ainput expressionrectangular matrix
    binput/output symbolvector; the symbol value is modified in place
  • The upper/lower triangular string ul may be specified as:
  • "U"the upper triangular part of a is to be used
    "L"the lower triangular part of a is to be used
  • The transposition string ts describes the operator opts and may be specified as:
  • "N"no transposition
    "T"transpose
    "C"conjugate transpose
  • The diagonal ones string dg may be specified as:
  • "U"the main diagonal of a is assumed to contain only ones
    "N"the actual values of the main diagonal of a are used
  • Dimensions of the matrix and vector arguments must be such that the dot product is well defined.

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Load the BLAS package:

Compute UpperTriangularize[a].b and save it in b:

Out[2]=2

Scope  (4)Survey of the scope of standard use cases

Real matrix and vectors:

Out[4]=4

Complex matrix and vectors:

Out[1]=1

Arbitrary-precision matrix and vectors:

Out[1]=1

Symbolic matrix and vectors:

Out[1]=1

Properties & Relations  (4)Properties of the function, and connections to other functions

TRMV["U","N","N",a,b] is equivalent to b=UpperTriangularize[a].b:

Out[4]=4

TRMV["L","T","N",a,b] is equivalent to b=Transpose[LowerTriangularize[a]].b:

Out[1]=1

Note this is not TRMV["U","N","N",a,b] as the lower triangular part is used for the transpose:

Out[2]=2

If dg="U", the diagonal values of a are assumed to be ones:

Out[1]=1

The diagonal has been effectively replaced by ones:

Out[2]=2

If a is a rectangular matrix then only the leading upper or lower triangular part of a is used:

Out[1]=1

The matrix a is effectively truncated to its upper left corner:

Out[2]=2

Possible Issues  (2)Common pitfalls and unexpected behavior

The last argument must be a symbol:

Out[2]=2

The last argument must be initialized to a vector:

Out[1]=1
Wolfram Research (2017), TRMV, Wolfram Language function, https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html.
Wolfram Research (2017), TRMV, Wolfram Language function, https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html.

Text

Wolfram Research (2017), TRMV, Wolfram Language function, https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html.

Wolfram Research (2017), TRMV, Wolfram Language function, https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html.

CMS

Wolfram Language. 2017. "TRMV." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html.

Wolfram Language. 2017. "TRMV." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html.

APA

Wolfram Language. (2017). TRMV. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html

Wolfram Language. (2017). TRMV. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html

BibTeX

@misc{reference.wolfram_2024_trmv, author="Wolfram Research", title="{TRMV}", year="2017", howpublished="\url{https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html}", note=[Accessed: 02-April-2025 ]}

@misc{reference.wolfram_2024_trmv, author="Wolfram Research", title="{TRMV}", year="2017", howpublished="\url{https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html}", note=[Accessed: 02-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_trmv, organization={Wolfram Research}, title={TRMV}, year={2017}, url={https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html}, note=[Accessed: 02-April-2025 ]}

@online{reference.wolfram_2024_trmv, organization={Wolfram Research}, title={TRMV}, year={2017}, url={https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRMV.html}, note=[Accessed: 02-April-2025 ]}