computes the matrix-vector multiplication α opts[a].x +β y and resets y to the result.


  • To use GEMV, you first need to load the BLAS Package using Needs["LinearAlgebra`BLAS`"].
  • The following arguments must be given:
  • tsinput stringtransposition string
    αinput expressionscalar mutliple
    ainput expressionrectangular matrix
    xinput expressionvector
    βinput expressionscalar multiple
    yinput/output symbolvector; the symbol value is modified in place
  • The transposition string ts describes the operator opts and may be specified as:
  • "N"no transposition
    "C"conjugate transpose
  • Dimensions of the matrix and vector arguments must be such that the dot product and addition are well defined.


open allclose all

Basic Examples  (1)

Load the BLAS package:

Compute a.x+2 y and save it in y:

Scope  (4)

Real matrix and vectors:

Complex matrix and vectors:

Arbitrary-precision matrix and vectors:

Symbolic matrix and vectors:

Properties & Relations  (3)

GEMV["N",α,a,x,β,y] is equivalent to y=α a.x+β y:

GEMV["T",α,a,x,β,y] is equivalent to y=α Transpose[a].x+β y:

GEMV["C",α,a,x,β,y] is equivalent to y=α ConjugateTranspose[a].x+β y:

Possible Issues  (2)

The last argument must be a symbol:

If the last argument is not a symbol initialized to a vector then an error message is issued: