Matrix<T>.Multiply Operator

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2

Overload List

Multiply(T, Matrix<T>) Multiplies a matrix by a scalar.
Multiply(Matrix<T>, T) Multiplies a matrix by a scalar.
Multiply(Matrix<T>, Matrix<T>) Multiplies two matrix objects.
Multiply(Matrix<T>, Vector<T>) Multiplies a Vector<T> by a Matrix<T>.
Multiply(Vector<T>, Matrix<T>) Multiplies a Vector<T> by a Matrix<T>.

Multiply(T, Matrix<T>) Operator

Multiplies a matrix by a scalar.
C#
public static Matrix<T> operator *(
	T factor,
	Matrix<T> matrix
)

Parameters

factor  T
A number.
matrix  Matrix<T>
A matrix.

Return Value

Matrix<T>
A matrix whose elements are the corresponding elements of matrix multiplied by factor.

Exceptions

ArgumentNullException

matrix is null.

Multiply(Matrix<T>, T) Operator

Multiplies a matrix by a scalar.
C#
public static Matrix<T> operator *(
	Matrix<T> matrix,
	T factor
)

Parameters

matrix  Matrix<T>
A matrix.
factor  T
A number.

Return Value

Matrix<T>
A matrix whose elements are the corresponding elements of matrix multiplied by factor.

Exceptions

ArgumentNullException

matrix is null.

Multiply(Matrix<T>, Matrix<T>) Operator

Multiplies two matrix objects.
C#
public static Matrix<T> operator *(
	Matrix<T> matrix1,
	Matrix<T> matrix2
)

Parameters

matrix1  Matrix<T>
The first Matrix<T>.
matrix2  Matrix<T>
The second Matrix<T>.

Return Value

Matrix<T>
A Matrix<T> that is the product of matrix1 and matrix2.

Exceptions

DimensionMismatchException

The number of columns of matrix1 does not equal the number of rows of matrix2.

Multiply(Matrix<T>, Vector<T>) Operator

Multiplies a Vector<T> by a Matrix<T>.
C#
public static Vector<T> operator *(
	Matrix<T> matrix,
	Vector<T> vector
)

Parameters

matrix  Matrix<T>
A Matrix<T>.
vector  Vector<T>
A vector.

Return Value

Vector<T>
A vector that is the product of matrix and vector.

Exceptions

DimensionMismatchException

The length of vector does not equal the number of columns in matrix.

Multiply(Vector<T>, Matrix<T>) Operator

Multiplies a Vector<T> by a Matrix<T>.
C#
public static Vector<T> operator *(
	Vector<T> vector,
	Matrix<T> matrix
)

Parameters

vector  Vector<T>
A vector.
matrix  Matrix<T>
A Matrix<T>.

Return Value

Vector<T>
A vector that is the product of matrix and vector.

Exceptions

DimensionMismatchException

The length of vector does not equal the number of columns in matrix.

See Also