Last Modified: January 9, 2017

Performs the multiplication of two input matrices or an input matrix and an input vector.

The input matrix.

This input accepts the following data types:

- 1D array of double-precision, floating-point numbers
- 1D array of complex double-precision, floating-point numbers
- 2D array of double-precision, floating-point numbers
- 2D array of complex double-precision, floating-point numbers

The inputs of this node cannot both be vectors.

If the inputs of this node are both matrices, the number of columns in the first matrix must match the number of rows in the second matrix and must be greater than zero. Otherwise, the node returns an empty array as the output matrix multiplication and returns an error.

The second matrix.

If the inputs of this node are both matrices, the number of columns in the first matrix must match the number of rows in the second matrix and must be greater than zero. Otherwise, the node returns an empty array as the output matrix multiplication and returns an error.

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

**Default: **No error

Result of the multiplication of the first and second inputs.

This output changes to **A x v** or **v' x A** depending on the data type you wire to the inputs.

If *A* is an *n*-by-*k* matrix and *B* is a *k*-by-*m* matrix, the matrix multiplication of *A* and *B*, *C* = *A**B*, results in a matrix, *C*, whose dimensions are *n*-by-*m*. Let *A* represent the 2D input **matrix A**, *B* represent the 2D input **matrix B**, and *C* represent the 2D output **A x B**. This node calculates the elements of *C* using the following equation.

$\begin{array}{cc}{c}_{ij}=\underset{l=0}{\overset{k-1}{\sum}}{a}_{il}{b}_{lj}& \text{for}\{\begin{array}{c}i=0,1,2,\mathrm{...},n-1\\ j=0,1,2,\mathrm{...},m-1\end{array}\end{array}$

where

*n*is the number of rows in**matrix A***k*is the number of columns in**matrix A**and the number of rows in**matrix B***m*is the number of columns in**matrix B**

If *A* is an *n*-by-*k* matrix and *x* is a vector with *k* elements, the multiplication of *A* and *x*, *y* = *A**x*, results in a vector *y* with *n* elements. This node calculates the elements of *y* using the following equation.

$\begin{array}{cc}{y}_{i}=\underset{j=0}{\overset{k-1}{\sum}}{a}_{ij}{x}_{j}& \text{for}\end{array}\begin{array}{c}i=0,1,2,\mathrm{...},n-1\end{array}$

where

*y*is the output**A x v***A*is the input**matrix A***x*is the input**vector v***n*is the number of rows in**matrix A***k*is the number of columns in**matrix A**and the number of elements in**vector v**

If *X*' is a row vector with *n* elements and *A* is an *n*-by-*k* matrix, the multiplication of *X*' and *A*, *Y* = *X*'*A*, results in a row vector *Y*' with *k* elements. This node calculates the elements of *Y*' using the following equation.

$\begin{array}{cc}{y}_{j}=\underset{i=0}{\overset{n-1}{\sum}}{a}_{ij}{x}_{i}& \text{for}\end{array}\begin{array}{c}j=0,1,2,\mathrm{...},k-1\end{array}$

and

$\begin{array}{c}X\prime =\left[\begin{array}{cccc}{x}_{0}& {x}_{1}& \dots & {x}_{n-1}\end{array}\right]\\ Y\prime =\left[\begin{array}{cccc}{y}_{0}& {y}_{1}& \dots & {y}_{k-1}\end{array}\right]\end{array}$

where

*Y*' is the output**v' x A***X*' is the input**vector v'***A*is the input**matrix B***n*is the number of elements in**vector v'**and the number of rows in**matrix B***k*is the number of columns in**matrix B**

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: Not supported