TRSV[ul,ts,dg,a,b]
solves the triangular system of linear equations opts[a].x==b and resets b to the result x.
TRSV
TRSV[ul,ts,dg,a,b]
solves the triangular system of linear equations opts[a].x==b and resets b to the result x.
詳細とオプション
- To use TRSV, 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 a input expression rectangular matrix b input/output symbol vector; 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.
例題
すべて開く すべて閉じる例 (1)
Needs["LinearAlgebra`BLAS`"]Compute Inverse[UpperTriangularize[a]].b and save it in b:
b = {-2, 1};
a = {{1, 3}, {2, 4}};
TRSV["U", "N", "N", a, b];
bScope (4)
b = {2.3, 1.2, 3.9};
a = {{2.1, 0, 1.4}, {3.5, 2.4, 0.4}, {0, 2.7, 1.3}};
TRSV["U", "N", "N", a, b];
b//Chopb = {2.3 + 3.I, 1.2 I, -3. + 2.I};
a = {{2.1, 0, 1.4 I}, {3.5 I, 2.4, 0.4 + I}, {0, 2.7, 1.3 I}};
TRSV["U", "N", "N", a, b];
bArbitrary-precision matrix and vectors:
b = {-2`20, 1};
a = {{1`20, 3}, {2, 4}};
TRSV["L", "N", "N", a, b];
bb = {b1, b2};
a = {{m11, m12}, {m21, m22}};
TRSV["L", "N", "U", a, b];
bProperties & Relations (3)
For invertible matrices a, TRSV["U","N","N",a,b] is equivalent to b=Inverse[UpperTriangularize[a]].b:
b = b1 = RandomReal[1, {5}];
a = RandomReal[1, {5, 5}];
TRSV["U", "N", "N", a, b];
b == Inverse[UpperTriangularize[a]].b1For invertible matrices a, TRSV["L","T","N",a,b] is equivalent to b=Inverse[Transpose[LowerTriangularize[a]]].b:
b = bU = bL = RandomReal[1, {5}];
a = RandomReal[1, {5, 5}];
TRSV["L", "T", "N", a, bL];
bL == Inverse[Transpose[LowerTriangularize[a]]].bNote this is not TRSV["U","N","N",a,b] as the lower triangular part is used for the transpose:
TRSV["U", "N", "N", a, bU];
bL == bUIf dg="U", the diagonal values of a are assumed to be ones:
b = {-2, 1};
a = {{3, 3}, {2, 4}};
TRSV["U", "N", "U", a, b];
bThe diagonal has been effectively replaced by ones:
Inverse[{{1, 3}, {0, 1}}].{-2, 1}Possible Issues (3)
The last argument must be a symbol:
a = {{1, 3}, {2, 4}};
TRSV["U", "N", "N", a, {1, 2}]The last argument must be initialized to a vector:
Clear[b];
a = {{1, 3}, {2, 4}};
TRSV["U", "N", "N", a, b]If a is a rectangular matrix then only the leading upper or lower triangular part of a is used:
b = b1 = {1, 1};
a = {{3, 3}, {2, 4}, {-2, 3}};
TRSV["L", "N", "N", a, b];
bThe matrix a is effectively truncated to its upper left corner:
Inverse[{{3, 0}, {2, 4}}].b1関連するガイド
テキスト
Wolfram Research (2017), TRSV, Wolfram言語関数, https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRSV.html.
CMS
Wolfram Language. 2017. "TRSV." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRSV.html.
APA
Wolfram Language. (2017). TRSV. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRSV.html
BibTeX
@misc{reference.wolfram_2026_trsv, author="Wolfram Research", title="{TRSV}", year="2017", howpublished="\url{https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRSV.html}", note=[Accessed: 15-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_trsv, organization={Wolfram Research}, title={TRSV}, year={2017}, url={https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/TRSV.html}, note=[Accessed: 15-August-2026]}