Professional Documents
Culture Documents
International Islamic University Chittagong
International Islamic University Chittagong
Department of EEE
Course No. EEE-2410
Experiment No. 6
Name of the Experiment: Determination of Direct Solution of Linear Equations using
Gauss Elimination Method.
A sample set of Linear Equations is shown below,
2x + 3y - 5z = 4
x + y - 2z = 3
3x y + z = -5
Gauss Elimination Method is used to solve these type of Linear equation set.
3 -5
1 -2
-1 1
4
3
-5
-1 1
1 -2
3 -5
-5
3
4
3. make the first element of the first row 1 by dividing the entire row by itself
1.0000 -0.3333 0.3333 -1.6667
1
1
-2
3
2
3
-5
4
4. make the first element zero(0) of other rows using first row. Here, if we make new
r2 = r2 - r1, and r3 = r3 - r1*2; then the matrix becomes;
1.0000 -0.3333 0.3333 -1.6667
0 1.3333 -2.3333 4.6667
0 3.6667 -5.6667 7.3333
5. now if we take a smaller matrix from 2nd row and 2nd column and repeat from step
1, we get,
for j=(i+1):n
fctr=x(j,i);
for k=i:(n+1)
x(j,k)=x(j,k)-x(i,k)*fctr;
end
end
end