### Upper-Triangular Matrix transform and solving Using Back-Substitution in c++

Definition (Upper-Triangular Matrix).

An matrix is called upper-triangular provided that the elements satisfy whenever .
If A is an upper-triangular matrix, then is said to be an upper-triangular system of linear equations.

(1) Suppose that is an upper-triangular system with the form given above in (1).  If for then there exists a unique solution.

The back substitution algorithm.

To solve the upper-triangular system by the method of back-substitution. Proceed with the method only if all the diagonal elements are nonzero. First compute and then use the rule for Or, use the "generalized rule" for where the "understood convention" is that is an "empty summation" because the lower index of summation is greater than the upper index of summation.

Remark. The loop control structure will permit us to use one formula.

C++ programming Code :

Output of program :

Enter the size Of Matrix
3
Enter the matrix by rows
x
1
x
-2
x
1
x
0
x
1
x
6
x
0
x
0
x
1
Enter the Element into b =
4
Enter the Element into b =
-1
Enter the Element into b =
2
1       -2      1
0       1       6
0       0       1
Soluation of Ax=b is X = -24
Soluation of Ax=b is X = -13
Soluation of Ax=b is X = 2
Press any key to continue . . .

#### Post a Comment

Copyright © 2010-2019 C++ Examples

Designed by Templateism. Built with Blogger Templates.