 Login  |   Contact  |   About Us       Tuesday, May 17, 2022  ~ Jacobi-Seidel ~ Gauss-Jordan ~ LU Decomposition

 "Linear Algebraic Equations" LU Decomposition Method
 Solution from the LU Decomposition Method

 Inverse of A = (0, 1, -1 2, -2, 1 -1, 0, 1) Solution of the equations = (8, -3, -5)

 Determinant of A = -1 Test Inverse: BB*Inverse = (1, 0, 0 0, 1, 0 0, 0, 1)

 Matrix A: = { , , }, { , , }, { , , } Vector b: = { , , } [ Initial MatrixValues A: { 2, 1, 1 }, { 3, 1, 2 }, { 2, 1, 2 } ] [ Initial VectorValues b: { 8, 11, 3 } ]

IMPLEMENTATION
LU Decomposition

The LU Decomposition is a matrix decomposition which represents a matrix as the product of a lower and upper triangular matrix. This decomposition is used in numerical analysis to solve systems of linear equations and to find the inverse of a matrix.

Algorithms

If a Matrix A can be written as the product of two matrices

 A = L . U

where L is the lower triangular and U is the upper triangular. It is possible then to use this decomposition to solve the linear equations,

 A . x = (L .U) . x = L . (U . x) = b

by first solving for the vecor y such that

 L . y = b

and then solving

 U . x = y

The advantage of decomposing one linear system into two succesive ones is that the solution of a triangular set of equations can be easily obtained just by a forward or backward substitution.

Matrix Inverse

Using the above LU decomposition and substitution methods, computing the inverse of a matrix column by column is straightforward. Testing LU Decomposition Method

In order to test the method as defined above, a new TestLUDecomposition() static method has been added and executed. Supporting code and methods are not shown.

A set of initial equations for the test has been defined for Matrix A and Vector b.

static void TestLUDecomposition();
{
ListBox1.Items.Clear();
ListBox2.Items.Clear();
LinearSystem ls = new LinearSystem();
MatrixR A = new MatrixR(new double[3, 3] { { t1, t2, t3 }, { t4, t5, t6 }, { t7, t8, t9 } });
VectorR b = new VectorR(new double { t10, t11, t12 });
MatrixR AA = A.Clone();
MatrixR BB = A.Clone();
double d = ls.LUCrout(A, b);
MatrixR inv = ls.LUInverse(AA);
ListBox1.Items.Add("Inverse of A = " + inv.ToString());
ListBox1.Items.Add("Solution of the equations = " + b.ToString());
ListBox2.Items.Add("Test Inverse: BB*Inverse = " + BB * inv);
}

An initial set of data points was defined for matrix A and vector b. The user can manipulate all values and try variations on the matrix and vector themselves.

 Other Implementations...

 Object-Oriented Implementation Graphics and Animation Sample Applications Ore Extraction Optimization Vectors and Matrices Complex Numbers and Functions Ordinary Differential Equations - Euler Method Ordinary Differential Equations 2nd-Order Runge-Kutta Ordinary Differential Equations 4th-Order Runge-Kutta Higher Order Differential Equations Nonlinear Systems Numerical Integration Numerical Differentiation Function Evaluation  Math, Analysis,
expertise..."

EIGENVALUE
SOLUTIONS...

> Rayleigh-Quotient Method

> Cubic Spline Method

 Applied Mathematical Algorithms ComplexFunctions NonLinear Differentiation Integration
 About Us KMP Software Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms. Areas of Expertise SpecialFunctions VectorsMatrices OptimizationMethods ComplexNumbers Interpolation CurveFitting NonLinearSystems LinearEquations DistributionFunctions NumericalDifferentiation NumericalIntegration DifferentialEquations Smalltalk FiniteBoundary Eigenvalue Graphics UnderstandingMining MiningMastery MineralNews MineralCommodities MineralForum Crystallography Services NumericalModeling WebServices MainframeServices OutsourceServices LINKED IN KMP ARTICLES Brand Login Contact