## Types

Type Matrix

Namespace MathNet.Numerics.LinearAlgebra

Interfaces IMatrix<T>, ICloneable

### Public instance methods

 `IMatrix` m

#### void ArrayDivide(IMatrix<T> m)

 `IMatrix` m

#### void ArrayMap(Converter<double, double> mapping)

 `Converter` mapping

#### void ArrayMultiply(IMatrix<T> m)

 `IMatrix` m

#### void ArrayPower(double exponent)

In place element-by-element raise to power, `A[i,j] = A[i,j]^exponent`.
 `double` exponent

#### CholeskyDecomposition chol()

Cholesky Decomposition
 return `CholeskyDecomposition`

#### Matrix Clone()

Returns a deep copy of this instance.
 return `Matrix`

#### double Condition()

Matrix condition (2 norm)
 return `double`

#### Double[,] CopyToArray()

Copies the internal data structure to a 2-dimensional array.
 return `Double[,]`

#### Double[][] CopyToJaggedArray()

Copies the internal data structure to a jagged rectangular array.
 return `Double[][]`

#### double Determinant()

Matrix determinant
 return `double`

#### EigenvalueDecomposition Eigen()

Eigenvalue Decomposition
 return `EigenvalueDecomposition`

#### bool Equals(object obj)

 return `bool` `object` obj

#### Double[][] GetArray()

Returns the internal data structure array.
 return `Double[][]`

#### Vector GetColumnVector(int columnIndex)

Copies a specified column of this matrix to a new vector.
 return `Vector` `int` columnIndex

#### int GetHashCode()

 return `int`

#### Matrix GetMatrix(int i0, int i1, int j0, int j1)

Gets a submatrix.
 return `Matrix` `int` i0 First row index. `int` i1 Last row index (inclusive). `int` j0 First column index. `int` j1 Last column index (inclusive).

#### Matrix GetMatrix(Int32[] r, Int32[] c)

 return `Matrix` `Int32[]` r `Int32[]` c

#### Matrix GetMatrix(int i0, int i1, Int32[] c)

 return `Matrix` `int` i0 `int` i1 `Int32[]` c

#### Matrix GetMatrix(Int32[] r, int j0, int j1)

 return `Matrix` `Int32[]` r `int` j0 `int` j1

#### Vector GetRowVector(int rowIndex)

Copies a specified row of this matrix to a new vector.
 return `Vector` `int` rowIndex

#### Type GetType()

 return `Type`

#### Matrix Inverse()

Matrix inverse or pseudoinverse.
 return `Matrix`

#### LUDecomposition LUD()

LU Decomposition
 return `LUDecomposition`

#### void Multiply(double s)

Multiplies in place this `Matrix` by a scalar.
 `double` s

#### Matrix Multiply(Matrix B)

Linear algebraic matrix multiplication, A * B
 return `Matrix` `Matrix` B

#### void Multiply(Double[] diagonal)

 `Double[]` diagonal

#### double Norm1()

One norm
 return `double`

#### double Norm2()

Two norm
 return `double`

#### double NormF()

Frobenius norm
 return `double`

#### double NormInf()

Infinity norm
 return `double`

#### QRDecomposition QRD()

QR Decomposition
 return `QRDecomposition`

#### int Rank()

Matrix rank
 return `int`

#### void ResetComputations()

Reset various internal computations. Call this method after you made changes directly on the the internal double[][] data structure.

#### void SetColumnVector(IVector<T> columnVector, int columnIndex)

 `IVector` columnVector `int` columnIndex

#### void SetMatrix(Int32[] r, Int32[] c, IMatrix<T> X)

 `Int32[]` r `Int32[]` c `IMatrix` X

#### void SetMatrix(int i0, int i1, Int32[] c, IMatrix<T> X)

 `int` i0 `int` i1 `Int32[]` c `IMatrix` X

#### void SetMatrix(int i0, int i1, int j0, int j1, IMatrix<T> X)

 `int` i0 `int` i1 `int` j0 `int` j1 `IMatrix` X

#### void SetMatrix(Int32[] r, int j0, int j1, IMatrix<T> X)

 `Int32[]` r `int` j0 `int` j1 `IMatrix` X

#### void SetRowVector(IVector<T> rowVector, int rowIndex)

 `IVector` rowVector `int` rowIndex

#### Matrix Solve(Matrix B)

Solve A*X = B against a Least Square (L2) criterion.
 return `Matrix` `Matrix` B right hand side

#### Matrix SolveRobust(Matrix B)

Solve A*X = B against a Least Absolute Deviation (L1) criterion.
 return `Matrix` `Matrix` B right hand side

#### Matrix SolveTranspose(Matrix B)

Solve X*A = B, which is also A'*X' = B'
 return `Matrix` `Matrix` B right hand side

#### void Subtract(IMatrix<T> m)

 `IMatrix` m

#### SingularValueDecomposition SVD()

Singular Value Decomposition
 return `SingularValueDecomposition`

#### Matrix TensorMultiply(Matrix B)

Tensor Product (Kronecker) of this and another matrix.
 return `Matrix` `Matrix` B The matrix to operate on.

#### string ToString()

Formats this matrix to a human-readable string
 return `string`

#### double Trace()

Matrix trace.
 return `double`

#### void Transpose()

In place transposition of this `Matrix`.
In case of non-quadratic matrices, this operation replaces the internal data structure. Hence, if you hold a reference to it for faster access, you'll need to get a new reference to it using GetArray.

#### void UnaryMinus()

In place unary minus of the `Matrix`.

### Public static methods

#### bool AlmostEqual(Matrix X, Matrix Y, double relativeAccuracy)

Returns true if two matrices are almost equal (with some given relative accuracy).
 return `bool` `Matrix` X `Matrix` Y `double` relativeAccuracy

#### bool AlmostEqual(Matrix X, Matrix Y)

Returns true if two matrices are almost equal.
 return `bool` `Matrix` X `Matrix` Y

#### Matrix ArrayDivide(IMatrix<T> m1, IMatrix<T> m2)

 return `Matrix` `IMatrix` m1 `IMatrix` m2

#### Matrix ArrayMap(IMatrix<T> m, Converter<double, double> mapping)

 return `Matrix` `IMatrix` m `Converter` mapping

#### Matrix ArrayMultiply(IMatrix<T> m1, IMatrix<T> m2)

 return `Matrix` `IMatrix` m1 `IMatrix` m2

#### Matrix ArrayPower(IMatrix<T> m, double exponent)

 return `Matrix` `IMatrix` m `double` exponent

#### Double[][] CloneMatrixData(Double[][] data)

 return `Double[][]` `Double[][]` data

#### Matrix Create(Double[,] A)

 return `Matrix` `Double[,]` A

#### Matrix Create(Double[][] A)

 return `Matrix` `Double[][]` A

#### Matrix CreateFromColumns(IList<Vector> columnVectors)

 return `Matrix` `IList` columnVectors

#### Matrix CreateFromRows(IList<Vector> rowVectors)

 return `Matrix` `IList` rowVectors

#### Double[][] CreateMatrixData(int m, int n)

Create the internal matrix data structure for a matrix of the given size. Initializing matrices directly on the internal structure may be faster than accessing the cells through the matrix class.
 return `Double[][]` `int` m Number of rows. `int` n Number of columns.

#### Matrix Diagonal(IVector<T> diagonalVector, int m, int n)

 return `Matrix` `IVector` diagonalVector `int` m `int` n

#### Matrix Diagonal(IVector<T> diagonalVector)

 return `Matrix` `IVector` diagonalVector

#### void GetRowColumnCount(Double[][] data, Int32& rows, Int32& columns)

 `Double[][]` data `Int32&` rows `Int32&` columns

#### Matrix Identity(int m, int n)

Generates identity matrix
 return `Matrix` `int` m Number of rows. `int` n Number of columns.

#### Matrix KroneckerProduct(Matrix A, Matrix B)

Kronecker Product of two matrices.
 return `Matrix` `Matrix` A `Matrix` B

#### Matrix Ones(int m)

Generates an m-by-m matrix filled with 1.
 return `Matrix` `int` m Number of rows = Number of columns

#### Matrix Random(int m, int n)

Generates matrix with standard-distributed random elements.
 return `Matrix` `int` m Number of rows. `int` n Number of columns.

#### Matrix Random(int m, int n, IContinuousGenerator randomDistribution)

Generates matrix with random elements.
 return `Matrix` `int` m Number of rows. `int` n Number of columns. `IContinuousGenerator` randomDistribution Continuous Random Distribution or Source

#### Matrix Transpose(IMatrix<T> m)

 return `Matrix` `IMatrix` m

#### Matrix Zeros(int m)

Generates an m-by-m matrix filled with 0.
 return `Matrix` `int` m Number of rows = Number of columns

### Public properties

#### CholeskyDecomposition CholeskyDecomposition get;

Cholesky Decomposition
 `return CholeskyDecomposition`

#### int ColumnCount get;

Gets the number of columns.
 `return int`

#### EigenvalueDecomposition EigenvalueDecomposition get;

Eigenvalue Decomposition
 `return EigenvalueDecomposition`

#### ComplexVector EigenValues get;

Gets the complex eigen values of this matrix.
The eigenvalue decomposition is cached internally..
 `return ComplexVector`

#### Matrix EigenVectors get;

Gets the complex eigen vectors of this matrix.
The eigenvalue decomposition is cached internally.
 `return Matrix`

#### double Item get; set;

Gets or set the element indexed by `(i, j)`in the `Matrix`.
 `return double`

#### LUDecomposition LUDecomposition get;

LU Decomposition
 `return LUDecomposition`

#### QRDecomposition QRDecomposition get;

QR Decomposition
 `return QRDecomposition`

#### int RowCount get;

Gets the number of rows.
 `return int`

#### SingularValueDecomposition SingularValueDecomposition get;

Singular Value Decomposition
 `return SingularValueDecomposition`