WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

GEMM[tsa,tsb,α,a,b,β,c]

computes the matrix-matrix multiplication α optsa[a].optsb[b]+β c and resets c to the result.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Properties & Relations  
Possible Issues  
Related Guides
Cite this Page
LinearAlgebra`BLAS`
LinearAlgebra`BLAS`

GEMM

GEMM[tsa,tsb,α,a,b,β,c]

computes the matrix-matrix multiplication α optsa[a].optsb[b]+β c and resets c to the result.

Details and Options

  • To use GEMM, you first need to load the BLAS Package using Needs ["LinearAlgebra`BLAS`"].
  • The following arguments must be given:
  • tsa input string transposition string for a
    tsb input string transposition string for b
    α input expression scalar mutliple
    a input expression rectangular matrix
    b input expression rectangular matrix
    β input expression scalar multiple
    c input/output symbol rectangular matrix; the symbol value is modified in place
  • The transposition strings describing the operators optsa and optsb and may be specified as:
  • "N" no transposition
    "T" transpose
    "C" conjugate transpose
  • Dimensions of the matrix arguments must be such that the dot product and addition are well defined.

Examples

open all close all

Basic Examples  (1)

Load the BLAS package:

Compute Transpose [a].b+2 c and save it in c:

Scope  (4)

Real matrices:

Complex matrices:

Arbitrary-precision matrices:

Symbolic matrices:

Properties & Relations  (3)

GEMM["N","N",α,a,b,β,c] is equivalent to c=α a.b+β c:

GEMM["T","N",α,a,b,β,b] is equivalent to c=α Transpose [a].b+β c:

GEMM["C" ,"T",α,a,b,β,b] is equivalent to c=α ConjugateTranspose [a].Transpose [b]+β c:

Possible Issues  (2)

The last argument must be a symbol:

The last argument must be initialized to a matrix:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2025_gemm, organization={Wolfram Research}, title={GEMM}, year={2017}, url={https://reference.wolfram.com/language/LowLevelLinearAlgebra/ref/GEMM.html}, note=[Accessed: 16-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /