# Thread: solving a matrix using gaussian elimination and 4 digit arithmetic and rounding

1. ## solving a matrix using gaussian elimination and 4 digit arithmetic and rounding

6x + 2y + 2z = -2

2x + 2/3y + 1/3z = 1

x + 2y - z = 0

This is part of a numerical methods tutorial sheet, I cant seem to solve them when im asked to use a certain digit arithmetic with rounding, would really appreciate if someone could go through it painfully slowly. I have answer in front of me but cant get it, I think im missing something that should be rather simple.

Thanks

Nappy

2. Then ignore the "rounding part" until the end! Do you know how to set this up as a matrix and do the "Gaussian elimination" part?

3. Originally Posted by HallsofIvy
Then ignore the "rounding part" until the end! Do you know how to set this up as a matrix and do the "Gaussian elimination" part?
I'm not sure that's correct. You definitely will get different values if you employ some sort of computer arithmetic throughout the calculations, than if you only round at the end.

To Nappy: what are the rules for your 4-digit arithmetic? By rules, I guess I mean what are the answers to the following questions:

1. What is a 4-digit number? Is it $z.zzz\times 10^{y}?$
2. How do you add two 4-digit numbers?
3. How do you subtract two 4-digit numbers?
4. How do you multiply two 4-digit numbers?
5. How do you divide two 4-digit numbers?

Once you have that, you can start in. I'm assuming you'd start with something like the following augmented system (subject to the answer to #1 above):

$\left[\begin{matrix}6.000 &2.000 &2.000\\
2.000 &0.666 &0.333\\
1.000 &2.000 &-1.000\end{matrix}\;\right|\left\begin{matrix}-2.000\\ 1.000\\ 0.000\end{matrix}\right].$