# LQDecomposition<T> Class

Represents the LQ decomposition of a matrix.

## Definition

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
``````public class LQDecomposition<T> : Decomposition<T>
``````
Inheritance
Object  →  LinearOperator<T>  →  Decomposition<T>  →  LQDecomposition<T>

T

## Remarks

The LQ decomposition of a matrix A rewrites the matrix in the form A= LQ, where Q is an orthogonal matrix, and L is a lower-triangular matrix.

The LQDecomposition<T> class has no constructors. Instead, use the GetLQDecomposition() instance method to create an LQ decomposition for a matrix.

LQDecomposition<T> can operate in two modes. In overwrite mode, the original matrix is overwritten by the decomposition. In preserve mode, the original matrix is preserved, and a new matrix is created to hold the decomposition. You can set the mode through the Overwrite property.

LQDecomposition<T> inherits from LinearOperator<T>. This means you can use it to solve systems of linear equations. You can solve for a single right-hand side, or for multiple right-hand sides using the Solve(Vector<T>) method. You can also calculate the determinant, the inverse, and an estimate for the EstimateConditionNumber().

## Constructors

 LQDecomposition Constructs a new LQDecomposition.

## Properties

 BaseMatrix Gets the underlying matrix of the decomposition. (Inherited from Decomposition) ColumnCount Gets the number of columns in the matrix. (Inherited from LinearOperator) ColumnIndex Gets or sets the index of labels for the columns of the matrix. (Inherited from LinearOperator)Preliminary Done Gets or sets a value that indicates whether the decomposition has been performed. (Inherited from Decomposition) ElementType Gets the element type of the matrix. (Inherited from LinearOperator) Factors Gets a collection of the matrix factors that make up the decomposition. (Overrides Decomposition.Factors) LowerTriangularFactor Gets the upper triangular matrix R of this LQDecomposition. OrthogonalFactor Gets the orthogonal matrix Q of this LQDecomposition. Overwrite Gets or sets a value indicating whether the BaseMatrix should be overwritten by its decomposition. (Inherited from Decomposition) RowCount Gets the number of rows in the matrix. (Inherited from LinearOperator) RowIndex Gets or sets the index of labels for the rows of the matrix. (Inherited from LinearOperator)Preliminary ThinOrthogonalFactor Gets the 'thin' part of the orthogonal matrix Q of this LQDecomposition. TrimmedLowerTriangularFactor Gets the upper triangular matrix R of this LQDecomposition.

## Methods

 AddProductToVector Multiplies a Vector by this instance and stores the result in a second vector of type DenseVector. (Inherited from LinearOperator)Obsolete. ApplyQ(DenseMatrix) Multiplies a matrix in place by the orthogonal matrix Q of this LQDecomposition. Obsolete. ApplyQ(DenseVector) Multiplies a vector in place by the orthogonal factor Q of this LQDecomposition. Obsolete. ApplyQ(TransposeOperation, DenseMatrix) Multiplies a matrix in place by the orthogonal matrix Q of this LQDecomposition, or its transpose. Obsolete. ApplyQ(TransposeOperation, DenseVector) Multiplies a vector in place by the orthogonal factor Q of this LQDecomposition, or its transpose. Obsolete. ApplyQ(MatrixOperationSide, TransposeOperation, DenseMatrix) Multiplies a matrix in place by the orthogonal matrix Q of this LQDecomposition, or its transpose. Obsolete. Decompose Calculates the actual LQ decomposition. (Overrides Decomposition.Decompose()) Deconstruct Deconstructs an LQ decomposition into its component matrices. Equals Determines whether the specified object is equal to the current object.(Inherited from Object) EstimateConditionNumber Calculates an estimate for the condition number of the matrix. (Overrides LinearOperator.EstimateConditionNumber()) Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object) GetDeterminant Calculates the determinant of the decomposed matrix. (Overrides LinearOperator.GetDeterminant()) GetHashCode Serves as the default hash function.(Inherited from Object) GetInverse() Calculates the inverse matrix.. (Inherited from LinearOperator) GetInverse(Boolean) Calculates the inverse of the factorized matrix. (Overrides LinearOperator.GetInverse(Boolean)) GetObjectData Populates a SerializationInfo with the data needed to serialize the target object. (Inherited from LinearOperator) GetType Gets the Type of the current instance.(Inherited from Object) IsSingular Gets a value indicating whether the BaseMatrix of this decomposition is singular. (Inherited from Decomposition) LeastSquaresSolve(Matrix) Solves the system of linear equations for the specified right-hand side matrix in the least squares sense. (Inherited from LinearOperator) LeastSquaresSolve(Vector) Solves the system of linear equations for the specified right-hand side vector. (Inherited from LinearOperator) LeastSquaresSolve(DenseMatrix, Boolean) Solves the system of linear equations for the specified right-hand side dense matrix in the least squares sense and optionally overwrites the right-hand side with the solution. (Inherited from LinearOperator) LeastSquaresSolve(DenseVector, Boolean) Solves the system of linear equations for the specified right-hand side dense vector in the least squares sense and optionally overwrites the right-hand side with the solution. (Inherited from LinearOperator) LeastSquaresSolveInto(Matrix, Matrix) Solves a system of equations defined by the matrix and multiple right-hand sides in the least squares sense. (Inherited from LinearOperator) LeastSquaresSolveInto(Vector, Vector) Solves a system of equations defined by the matrix and the specified right-hand side in the least squares sense. (Overrides Decomposition.LeastSquaresSolveInto(Vector, Vector)) MemberwiseClone Creates a shallow copy of the current Object.(Inherited from Object) Multiply(Matrix) Applies the linear operator to a matrix.(Inherited from LinearOperator) Multiply(Vector) Applies the linear operator to a vector.(Inherited from LinearOperator) Multiply(TransposeOperation, Matrix) Multiplies a matrix on the left by this matrix. (Inherited from LinearOperator)Obsolete. Multiply(TransposeOperation, Vector) Multiplies a vector on the left by this vector. (Inherited from LinearOperator)Obsolete. MultiplyAndAddAsLeftFactorCore Multiplies the matrix with a vector, adds the scaled result to another scaled vector, and returns the result. (Inherited from Decomposition) MultiplyAsLeftCore(TransposeOperation, Matrix, Matrix) Multiplies a matrix by the linear operator and returns the result. (Inherited from Decomposition) MultiplyAsLeftCore(TransposeOperation, Vector, Vector) Multiplies a vector by the linear operator and returns the result. (Inherited from Decomposition) MultiplyTranspose(Matrix) Applies the transpose of the linear operator to a matrix.(Inherited from LinearOperator) MultiplyTranspose(Vector) Applies the (conjugate) transpose of the linear operator to a vector.(Inherited from LinearOperator) Rank() Returns the numerical rank of a matrix. (Inherited from LinearOperator) Rank(T) Returns the numerical rank of a matrix using the specified tolerance. (Overrides LinearOperator.Rank(T)) SetSingular Sets a flag that indicates the underlying matrix of this decomposition is singular. (Inherited from Decomposition) Solve(Matrix) Solves the system of linear equations for the specified right-hand side matrix. (Inherited from LinearOperator) Solve(Vector) Solves the system of linear equations for the specified right-hand side vector. (Inherited from LinearOperator) Solve(DenseMatrix, Boolean) Solves the system of linear equations for the specified right-hand side dense matrix and optionally overwrites the right-hand side with the solution. (Inherited from LinearOperator) Solve(DenseVector, Boolean) Solves the system of linear equations for the specified right-hand side dense vector and optionally overwrites the right-hand side with the solution. (Inherited from LinearOperator) SolveInto(Matrix, Matrix) Solves a system of equations defined by the matrix and multiple right-hand sides. (Inherited from LinearOperator) SolveInto(Vector, Vector) Solves a system of equations defined by the matrix and the specified right-hand side. (Inherited from LinearOperator) SolveInto(TransposeOperation, Matrix, Matrix) Solves a system of equations defined by the matrix and multiple right-hand sides. (Overrides LinearOperator.SolveInto(TransposeOperation, Matrix, Matrix)) SolveInto(TransposeOperation, Vector, Vector) Solves a system of equations defined by the matrix and the specified right-hand side. (Overrides LinearOperator.SolveInto(TransposeOperation, Vector, Vector)) SolveTranspose(Matrix) Solves the transposed system of linear equations for the specified right-hand side matrix. (Inherited from LinearOperator) SolveTranspose(Vector) Solves the system of linear equations for the specified right-hand side vector. (Inherited from LinearOperator) SolveTranspose(DenseMatrix, Boolean) Solves the transposed system of linear equations for the specified right-hand side dense matrix and optionally overwrites the right-hand side with the solution. (Inherited from LinearOperator) SolveTranspose(DenseVector, Boolean) Solves the transposed system of linear equations for the specified right-hand side dense vector and optionally overwrites the right-hand side with the solution. (Inherited from LinearOperator) SolveTransposeInto(Matrix, Matrix) Solves a system of equations defined by the matrix and multiple right-hand sides. (Inherited from LinearOperator) SolveTransposeInto(Vector, Vector) Solves a system of equations defined by the matrix and the specified right-hand side. (Inherited from LinearOperator) ToString Returns a string that represents the current object.(Inherited from Object)