Posts

Showing posts from May, 2017

mathajax

Solving Linear equations by Lower Triangular & Forward Substitution

Image
The Java program that wrote down, finds a solution vector for a system of linear equations which has N equations and N variables by Lower Triangular matrix and Forward Substitution method. A system linear equations has a system matrix (coefficient matrix ), A and a non-homogeneous vector, b thereby, Augmented matrix A|b is formed to find solution vector for unknown variables of the system using lower triangular and forward substitution method. Example for Lower Triangular & Forward substitution The example shown below explains how to solve solution of linear system having 3 equations and 3 variables by lower triangular and forward substitution method. Given System of Linear Equation \[\begin{array}{c} 2.0x+4.0y+6.0z=18 \\ 4.0x+5.0y+6.0z=24 \\ 3.0x+1y-2.0z=4 \end{array} \] Augmented matrix A|b \[ \left[\begin{array}{rrr|r} 2.0 & 4.0 & 6.0 & 18.0 \\ 4.0 & 5.0 & 6.0 & 24.0 \\ 3.0 & 1.0 & -2.0 & 4.0

Solving System of Linear Equation by Gaussian Elimination

Image
Solving linear equation by matrix inverse method is difficult when a system has more than 3 equations and 3 unknown variables. hence, Gaussian elimination is preferred for solving system of linear equations, which has N linear equations and N unknown variables. Gaussian elimination is performed by two steps. they, upper triangular matrix back substitution System of Linear Equation by Gaussian Elimination - algorithm Given - system of Linear equations represents it in matrix form -: A - coefficient matrix X - unknown vector b - non-homogeneous vector form augmented matrix, A|b convert augmented matrix, A|b into upper triangular matrix, U by row operation U = A|b

Lower Triangular Matrix by Row Operation

Image
A system of Linear equations AX=b is to transformed into lower triangular matrix by elementary row operation in order to find a solution vector for the unknown vector X. The lower triangulation, which is a intermediate step for solving linear equations, is explained how to finds it from the system of linear equations by row operation . Lower triangular matrix - the matrix contains all elements above the main diagonal elements are zeros. system of Linear equations Matrix representation of system of Linear equations Low Triangular matrix algorithm steps Given matrix A, b and A is 3x3 and b is 3x1 matrix Augmented Matrix mat = A | b maxpivot - finds m th row has maximum value (pivotal value) along c th column RowOperation-swap - swaping two rows c th and m th RowOperation-add - Rc2 th <- ratio R c + R c2 For c=mat.Nrow-1 to &

Upper Triangular Matrix by Row Operation

Image
It explains how to decompose an augmented matrix into upper triangular matrix by row operation and it is implemented in Java programming. A system of linear equation is represented in matrix format by a matrix called A and two column vectors called X and b respectively. AX =b The X is an unknown vector and is to be found as solution for a system of linear equations. The Gaussian elimination is one of the methods for finding the unknown vector of a linear system of equations. The Gaussian elimination has two main steps Augmented matrix into Upper Triangular Back substitution Here, it contains explanation about how to decompose an augmented matrix into upper triangular matrix. The augmented matrix consist of coefficient matrix A and a column vector b i.e. Alb and it is decomposed into upper triangular matrix by elementary row operation. A matrix has rows and columns arrangements of elements and if all elements below th

Matrix Elementary Row Operation

Image
The matrix in algebra has three row operations are called Matrix Elementary Row Operation. They are Swapping any two rows Multiply a row by constant Adding any two rows The row operation is carried out on a matrix to turn it a lower triangular matrix or a upper triangular matrix to find out solution vector for system of linear equations. Swap two rows The matrix A has 3 rows and 3 columns. Row R 1 and R 2 swapped - Both rows interchanged their elements. i.e R 1 becomes R 2 and vice versa. Add two rows The matrix A has 3 rows and 3 columns. Add two rows R 1 and R 2 - R 1 's each elements is added to R 2 's corresponding elements. resultant row replace row R 2 i.e R 2 -> R 1 + R 2 . Multiply a row by constant