## sasogeek 3 years ago How do you solve for a 5 variable simultaneous equation using matrices?

1. lgbasallote

cramer's?

2. sasogeek

I've forgotten it, might have to revise it... you mind helping me out with it?

3. lgbasallote

honestly....i have no idea how to do it....you can judge from my profile picture that i hate math...

4. lgbasallote

maybe @sauravshakya knows though

5. sauravshakya

yeah I have also done for 2 variables.

6. sauravshakya

Dont know how to do for more than that......

7. sasogeek

I'm supposed to write a program in c++ that solves a 5 variable simultaneous equation, I've done that for 2 variables and trying to use the same concept for 5 seems tedious, I need an alternative algorithm :P

8. sauravshakya

Nope....... I havent written a program.

9. sauravshakya

I guess u need to use 2-dimensional array

10. lgbasallote

all matrices use 2-dimensional array.....

11. sauravshakya

To write a program is different thing..... I even dont know how to solve 5 variable equation using matrix.

12. sauravshakya

@hartnn can u help? PLZ

13. estudier
14. sasogeek

That looks like I'd need loops but the lecturer hasn't taught loops so I'm not sure if it's okay to use 'em... :/ @estudier But seems like something fun to code since most of the work is already done in the pseudocode

15. sasogeek

all that he has talked about is input and output. it isn't an exercise for my class though, it's for that of some friends but since I know a little c++, I wanna help them

16. estudier

The procedure for 3 variables is described higher up the page so 5 variables is an extension of that. You could do it without loops but it would be a bit long...