Home Login  |   Contact  |   About Us       Thursday, November 28, 2024   

j0182018 - Back to Home
   Skip Navigation LinksHOME ›  AREAS OF EXPERTISE  #2 ›   Linear Equations  ›  ~ LU Decomposition



Skip Navigation Links.



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




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[3] { 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(" " + " ");
                 ListBox1.Items.Add("Solution of the equations = " + b.ToString());
                 ListBox2.Items.Add("Determinant of A = -1");
                 ListBox2.Items.Add(" " + " ");
                 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


   Quotes

Consulting Services - Back to Home


Home

Home Math, Analysis,
  expertise..."

EIGENVALUE
SOLUTIONS...


> Rayleigh-Quotient Method

> Cubic Spline Method

 

Applied Mathematical Algorithms

Home

ComplexFunctions

Home

NonLinear
Home

Differentiation
Home

Integration
About Us


KMP Software Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms.

      (About Us) →
Areas of
Expertise


SpecialFunctions
VectorsMatrices
OptimizationMethods
ComplexNumbers
Interpolation
CurveFitting
NonLinearSystems
LinearEquations
DistributionFunctions
NumericalDifferentiation
NumericalIntegration
DifferentialEquations
Smalltalk
FiniteBoundary
Eigenvalue
Graphics
Understanding
Mining


MiningMastery
MineralNews
MineralCommodities
MineralForum
Crystallography
Services


NumericalModeling
WebServices
MainframeServices
OutsourceServices

LINKED IN
MINE REVIEW(by G.Pacheco)
Brand





Home

Login

Contact
Since 2006 All Rights Reserved  © KMP Software Engineering LINKS | PRIVACY POLICY | LEGAL NOTICE