Home > Extreme Optimization Mathematics Library for .NET > Reference > Extreme.Mathematics.LinearAlgebra Namespace > Matrix Class > Operators and Type Conversions


Extreme Optimization Mathematics Library for .NET

Matrix Subtraction Operator 

Subtracts two Matrix objects.

[Visual Basic]
returnValue = Matrix.op_Subtraction(matrix1, matrix2)
[C#]
public static Matrix operator -(
   Matrix matrix1,
   Matrix matrix2
);

Parameters

matrix1
The first Matrix.
matrix2
The second Matrix.

Return Value

A Matrix that is equal to the matrix matrix1 minus the matrix matrix2.

Exceptions

Exception TypeCondition
ArgumentNullExceptionmatrix1 is a null reference (Nothing in Visual Basic).

-or-

matrix2 is a null reference (Nothing in Visual Basic).

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

See Also

Matrix Class | Extreme.Mathematics.LinearAlgebra Namespace