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 Addition Operator 

Adds two Matrix objects.

[Visual Basic]
returnValue = Matrix.op_Addition(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 the sum of matrix1 and matrix2. A Matrix that is the sum of the specified form of this matrix and the matrix matrix2.

Exceptions

Exception TypeCondition
DimensionMismatchExceptionThe dimensions of this instance and the matrix matrix2 are not compatible for the specified operation.
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