Current location - Quotes Website - Team slogan - How to solve the ternary linear equations?
How to solve the ternary linear equations?
How to solve the ternary linear equations, the answer is as follows:

Suppose we have the following ternary linear equation:

a 1 * x+b 1 * y+c 1 * z = d 1 a2 * x+B2 * y+C2 * z = D2 a3 * x+B3 * y+C3 * z = D3

Where a 1, b 1, c 1, a2, b2, c2, a3, b3 and c3 are coefficients, x, y and z are unknowns, d 1, d2 and d3 are constants.

Solution 1: Exclusion method

1. Write the equation in matrix form: | a1a2a3 ||| b1b2b3 |||||| c1c2c3 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

2. Next, the matrix is transformed into a trapezoidal matrix by using the elimination method of the matrix.

Swap the rows of the matrix so that the first row is not zero. If the first line is all zeros, swap the second and third lines. Multiply the first line by a non-zero constant k, so that the first line is not equal to other lines. Divide each row of the matrix by the first row so that the first row is the identity matrix. Repeat the above steps until the matrix becomes a trapezoidal matrix.

3. Solving the unknowns in trapezoidal matrix: solving Z, Y and X from bottom to top. Let the ladder matrix be |100 |||||| 020||||||||||||||||||||||||||||||||||| | 4 ||||||||||||| 8 | Solve from bottom to top: z=8/3 can be obtained from the last line. Substituting the value of z into the second row gives y=6-2z=6-2*(8/3)=2/3. Substitute the values of z and y into the first row, and x=4-z-y=4-8/3-2/3=2/3.

So the solutions of ternary linear equations are x=2/3, y=2/3 and z=8/3.

Solution 2: Substitution method

Choose two equations from three equations, and express the unknown of one equation as the unknown of the other equation. For example, we can express X in the first equation as X: X = (D2-B2 * Y-C2 * Z)/A2 in the second equation, and substitute this expression into the third equation to get a quadratic equation with one variable about Y and Z.

Solve this unary quadratic equation, get the values of y and z, substitute the values of y and z into the expression of x, get the value of x, and finally get the solution of the ternary linear equations.