mult_matrixT_mult_matrixMultMatrixMultMatrixmult_matrix (Operator)

Name

mult_matrixT_mult_matrixMultMatrixMultMatrixmult_matrix — Multiply two matrices.

Signature

mult_matrix( : : MatrixAID, MatrixBID, MultType : MatrixMultID)

Herror T_mult_matrix(const Htuple MatrixAID, const Htuple MatrixBID, const Htuple MultType, Htuple* MatrixMultID)

void MultMatrix(const HTuple& MatrixAID, const HTuple& MatrixBID, const HTuple& MultType, HTuple* MatrixMultID)

HMatrix HMatrix::MultMatrix(const HMatrix& MatrixBID, const HString& MultType) const

HMatrix HMatrix::MultMatrix(const HMatrix& MatrixBID, const char* MultType) const

HMatrix HMatrix::MultMatrix(const HMatrix& MatrixBID, const wchar_t* MultType) const   (Windows only)

static void HOperatorSet.MultMatrix(HTuple matrixAID, HTuple matrixBID, HTuple multType, out HTuple matrixMultID)

HMatrix HMatrix.MultMatrix(HMatrix matrixBID, string multType)

def mult_matrix(matrix_aid: HHandle, matrix_bid: HHandle, mult_type: str) -> HHandle

Description

The operator mult_matrixmult_matrixMultMatrixMultMatrixMultMatrixmult_matrix computes the product of the input matrices MatrixA and MatrixB defined by the matrix handles MatrixAIDMatrixAIDMatrixAIDMatrixAIDmatrixAIDmatrix_aid and MatrixBIDMatrixBIDMatrixBIDMatrixBIDmatrixBIDmatrix_bid. A new matrix MatrixMult is generated with the result. The operator returns the matrix handle MatrixMultIDMatrixMultIDMatrixMultIDMatrixMultIDmatrixMultIDmatrix_mult_id of the matrix MatrixMult. Access to the elements of the matrix is possible e.g., with the operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix. If desired, one or both input matrices will be transposed for the multiplication.

The type of multiplication can be selected via MultTypeMultTypeMultTypeMultTypemultTypemult_type:

'AB'"AB""AB""AB""AB""AB":

The matrices MatrixA and MatrixB will not be transposed. Therefore, the formula for the calculation of the result is:

The number of columns of the matrix MatrixA must be identical to the number of rows of the matrix MatrixB.

Example:

'ATB'"ATB""ATB""ATB""ATB""ATB":

The matrix MatrixA will be transposed. The matrix MatrixB will not be transposed. Therefore, the formula for the calculation of the result is:

The number of rows of the matrix MatrixA must be identical to the number of rows of the matrix MatrixB.

Example:

'ABT'"ABT""ABT""ABT""ABT""ABT":

The matrix MatrixA will not be transposed. The matrix MatrixB will be transposed. Therefore, the formula for the calculation of the result is:

The number of columns of the matrix MatrixA must be identical to the number of columns of the matrix MatrixB.

Example:

'ATBT'"ATBT""ATBT""ATBT""ATBT""ATBT":

The matrix MatrixA and the matrix MatrixB will be transposed. Therefore, the formula for the calculation of the result is:

The number of rows of the matrix MatrixA must be identical to the number of columns of the matrix MatrixB.

Example:

Execution Information

Parameters

MatrixAIDMatrixAIDMatrixAIDMatrixAIDmatrixAIDmatrix_aid (input_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix A.

MatrixBIDMatrixBIDMatrixBIDMatrixBIDmatrixBIDmatrix_bid (input_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix B.

MultTypeMultTypeMultTypeMultTypemultTypemult_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of the input matrices.

Default value: 'AB' "AB" "AB" "AB" "AB" "AB"

List of values: 'AB'"AB""AB""AB""AB""AB", 'ABT'"ABT""ABT""ABT""ABT""ABT", 'ATB'"ATB""ATB""ATB""ATB""ATB", 'ATBT'"ATBT""ATBT""ATBT""ATBT""ATBT"

MatrixMultIDMatrixMultIDMatrixMultIDMatrixMultIDmatrixMultIDmatrix_mult_id (output_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the multiplied matrices.

Result

If the parameters are valid, the operator mult_matrixmult_matrixMultMatrixMultMatrixMultMatrixmult_matrix returns the value TRUE. If necessary, an exception is raised.

Possible Predecessors

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrixcreate_matrix

Possible Successors

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

Alternatives

mult_matrix_modmult_matrix_modMultMatrixModMultMatrixModMultMatrixModmult_matrix_mod

See also

mult_element_matrixmult_element_matrixMultElementMatrixMultElementMatrixMultElementMatrixmult_element_matrix, mult_element_matrix_modmult_element_matrix_modMultElementMatrixModMultElementMatrixModMultElementMatrixModmult_element_matrix_mod, div_element_matrixdiv_element_matrixDivElementMatrixDivElementMatrixDivElementMatrixdiv_element_matrix, div_element_matrix_moddiv_element_matrix_modDivElementMatrixModDivElementMatrixModDivElementMatrixModdiv_element_matrix_mod, transpose_matrixtranspose_matrixTransposeMatrixTransposeMatrixTransposeMatrixtranspose_matrix, transpose_matrix_modtranspose_matrix_modTransposeMatrixModTransposeMatrixModTransposeMatrixModtranspose_matrix_mod

References

David Poole: “Linear Algebra: A Modern Introduction”; Thomson; Belmont; 2006.
Gene H. Golub, Charles F. van Loan: “Matrix Computations”; The Johns Hopkins University Press; Baltimore and London; 1996.

Module

Foundation