This JavaScript Elabs learning object is intended for finding the solution to systems of linear equations up to three equations with three unknowns. It also allows us to find the inverse of a matrix.Other JavaScript learning objects for decision making in this series are categorized under different areas of applications at the MENU section on this page.
In entering your data to move from cell to cell in the datamatrix use the Tab key not arrow or enter keys.
Instructions and Applications:
Numerical Example 1: Consider the following system of equations:
X2 + X3 = 5
3X1 + X3 = 6
X1 + X2 = 1
The matrix of the coefficient of the variables is:
0 1 1
3 0 1
1 1 0
The first entry of the first column is zero, while there is always at least one nonzero element therein. Therefore, we have to rearrange the system of equation in such a way that any equation with zero X1 coefficient appear among the last set of equations. That is, considering an equivalent system of equation:
3X1 + X3 = 6
X1 + X2 = 1
X2 + X3 = 5
Solve this equivalent system of equation by entering its coefficient and the RHS values in the Data Entry Table, then click on the "Calculate" button. The output is the solution: X1 = 1, X2 = 2, and X3 = 3, which can be verified by substitutions.
Numerical Example 2: Suppose we wish to find the inverse (A^{1}) of the following matrix (if it exists) A:
2  1  
A  =  
1 

In general, to find the A^{1}, column by column, solve n systems of equations having the coefficient matrix A, however with n distinct identity vectors as their RHS value.
For this numerical example, we have to solve the following two systems of equations:
2X1 + X1 = 1
X1  X2 = 0
and
2X1 + X1 = 0
X1  X2 = 1
Notice that the coefficient of the variables X1 and X2 are matrix A in both systems of equations, however the RHS are two identity vectors in n=2 dimensional space.
The solutions, following the above instruction, of the first and second systems of equations provide the first and the second column of the A^{1} matrix.
To find the first column of A^{1} solve:
2X1 + X1 = 1
X1  X2 = 0
This gives X1 = 1/3 , X2 = 1/3. To find the second column of A^{1} solve:
2X1 + X1 = 0
X1  X2 = 1
This gives X1 = 1/3 , X2 = 2/3. Therefore, A^{1}p is
1/3  1/3  
A^{1}  =  
1/3 

1 6 4
2 4 1
1 2 5
Therefore, in applying the above procedure for inverting a matrix, if the matrix is a singular one, then at least of the systems of equations has no solution.
This is helpful in, e.g. finding the inverse of A_{10x10} matrix, where we have to change the RHS values only.
For extensive edit or to use the JavaScript for a new set of data, then use the "clear" button.
For Technical Details, Back to:
Topics in Linear Algebra
Kindly email your comments to:
Professor Hossein Arsham
The Copyright Statement: The fair use, according to the 1996 Fair Use Guidelines for Educational Multimedia, of materials presented on this Web site is permitted for noncommercial and classroom purposes only.
This site may be translated and/or mirrored intact (including these notices), on any server with public access. All files are available at http://home.ubalt.edu/ntsbarsh/Businessstat for mirroring.Kindly email me your comments, suggestions, and concerns. Thank you.
Back to: