c - Solving n linear equation -


i trying solve n linear equations n variables. used cramer's rule in cases failed when determinant equal zero. how approach problem ?

i using c language.

also linear equation of form:

for n = 3:

- x + y + z =   x - y + z = b   x + y - z = c 

for n = 2:

- x + y =   x - y = b 

i unable proceed further.

when solving cramer, if determinant 0 have 2 cases:

  • at least 1 variable has non 0 - determinant: there no solution
  • the determinant variables zero: have infinite number of solutions.

    in last case, can find answer in terms of 1 of variables.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -