({{, SYRK[ul,ts,α,a,β,b] 
computes the symmetric rank-k update α (Subscript[op, ts])[a].(RefLink[Transpose, paclet:ref/Transpose])[(Subscript[op, ts])[a]]+β b and resets the appropriate part of b to the result.}})

OpenersNotesSection(Spacer1)Details

To use SYRK, 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 strings describe the operators (Subscript[op, ts]) and may be specified as:

Dimensions of the matrix arguments must be such that the dot product and addition are well defined.

OpenersPrimaryExamplesSection(Spacer1)Examples  (8)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Load the BLAS package:

Needs["LinearAlgebra`BLAS`"]

Apply a symmetric rank-2 update to the upper triangular part of a matrix:

b={{2,1},{1,3}};
a={{1,2},{3,4}};
SYRK["U","N",1/2,a,2,b];
b

OpenersExampleSection1(Spacer1)Scope  (4)

Real matrices:

b={{1.,0.,0.},{0.,1.,0.},{0.,0.,1.}};
a={{-2.1,0.,3.2},{4.3,0.2,-0.3},{4.1,2.6,0.}};
SYRK["U","T",1.,a,2.,b];
b

Complex matrices:

b={{2.+I,1.},{1.,3. I}};
a={{2.1+0.5I,3.2+I},{4.1I,3.8}};
SYRK["L","C",1.0,a,-1.,b];
b

Arbitrary-precision matrices:

b={{2`20,1},{1,3}};
a={{1,2},{3,4}};
SYRK["U","N",1/2,a,2,b];
b

Integer-symbolic matrices:

Clear[α,β];
b={{1,0},{0,1}};
a={{a11},{a22}};
SYRK["U","N",α,a,β,b];
b

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

SYRK["U","N",α,a,β,b] is equivalent to b=α a.(RefLink[Transpose, paclet:ref/Transpose])[a]+β b applied to the upper triangular part of b:

b=RandomReal[1,{5,5}];
b=b1=(b+Transpose[b])/2;
a=RandomReal[1,{5,3}];
α=RandomReal[];
β=RandomReal[];
SYRK["U","N",α,a,β,b];
UpperTriangularize[b]==UpperTriangularize[α a.Transpose[a]+β b1]

The strictly lower triangular part of b is unchanged:

LowerTriangularize[b,-1]==LowerTriangularize[b1,-1]

OpenersExampleSection4(Spacer1)Possible Issues  (2)

The last argument must be a symbol:

SYRK["U","N",1/2,{{1,2},{-2,1}},2,{{1,2},{3,4}}]

The last argument must be initialized to a matrix:

Clear[b];
SYRK["U","N",1/2,{{1,2},{-2,1}},2,b]

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