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
Post a Comment