({{, TBSV[ul,ts,dg,k,(Subscript[a, band]),b] 
solves the system of linear equations (Subscript[op, ts])[a].x==b and resets b to the result x, where a is the square matrix corresponding to the banded matrix (Subscript[a, band]).}})

OpenersNotesSection(Spacer1)Details

To use TBSV, you first need to load the BLAS Package using (RefLink[Needs, paclet:ref/Needs])["LinearAlgebra`BLAS`"].

The following arguments must be given:

The upper/lower triangular string ul may be specified as:

The transposition string ts describes the operator (Subscript[op, ts]) and may be specified as:

The diagonal ones string dg may be specified as:

In a banded format, the upper or lower part of the matrix a is stored in a rectangular matrix. For the upper triangular part, the main diagonal is the last row, the first super diagonal is the penultimate row with a leading zero, the second super diagonal is the antepenultimate row with two leading zeroes, and so on.  For the lower triangular part, the main diagonal appears in the first row, followed by successive subdiagonals with trailing zeros.

The number 0≤k<(RefLink[Length, paclet:ref/Length])[a] indicates how many of the sub- or super-diagonals are treated as significant.  The others are assumed zero.

Dimensions of the matrix and vector arguments must be such that the dot product is well defined.

OpenersPrimaryExamplesSection(Spacer1)Examples  (9)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Load the BLAS package:

Needs["LinearAlgebra`BLAS`"]

Compute (RefLink[Inverse, paclet:ref/Inverse])[a].b and save it in b where ab is the corresponding matrix in banded format:

b={-2,1};
a={{1,3},{0,4}};
ab={{0,3},{1,4}};
TBSV["U","N","N",1,ab,b];
b

Compare a direct computation of the inverse:

Inverse[a].{-2,1}

OpenersExampleSection1(Spacer1)Scope  (4)

Real matrix and vectors:

b={2.3,1.2,3.9};
a={{2.1,1.4,0.},{0.,2.4,0.5},{0,0.,1.3}};
ab={{0.,1.4,0.5},{2.1,2.4,1.3}};
TBSV["U","N","N",1,ab,b];
b

Complex matrix and vectors:

b={2.3+3.I,1.2 I,-3.+2.I};
a={{2.1,1.4 I,0.},{0.,2.4,0.5+I},{0,0,1.3 I}};
ab={{0.,1.4I,0.5+I},{2.1,2.4,1.3I}};
TBSV["U","N","N",1,ab,b];
b

Arbitrary-precision matrix and vectors:

b={-2`20,1};
a={{1`20,0},{2,4}};
ab={{1`20,4},{2,0}};
TBSV["L","N","N",1,ab,b];
b

Symbolic matrix and vectors:

b={b1,b2};
a={{m11,0},{m21,m22}};
ab={{m11,m22},{m21,0}};
TBSV["L","N","U",1,ab,b];
b

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

TBSV["U","N","N",k,ab,b] is equivalent to b=(RefLink[Inverse, paclet:ref/Inverse])[a].b:

b=b1=RandomReal[1,{5}];
Do[ d[i]=RandomReal[1,{5-i}];,{i,0,2}];
a=ConstantArray[0.,{5,5}];
Do[ a=a+DiagonalMatrix[d[i],i];,{i,0,2}];
ab={PadLeft[d[2],5],PadLeft[d[1],5],d[0]};
TBSV["U","N","N",2,ab,b];
b==Inverse[a].b1

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

b={-2,1};
a={{3,3},{0,4}};
ab={{0,3},{3,4}};
TBSV["U","N","U",1,ab,b];
b

The diagonal has been effectively replaced by ones:

Inverse[{{1,3},{0,1}}].{-2,1}

OpenersExampleSection4(Spacer1)Possible Issues  (2)

The last argument must be a symbol:

a={{1,3},{0,4}};
ab={{0,3},{1,4}};
TBSV["U","N","N",1,ab,{1,2}]

The last argument is must be initialized to a vector:

Clear[b];
a={{1,3},{0,4}};
ab={{0,3},{1,4}};
TBSV["U","N","N",1,ab,b]

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Basic Linear Algebra Subroutines, paclet:LowLevelLinearAlgebra/guide/BLASGuide])}})}})