Linear Algebra and the C Language/a062
The coefficients of the equation of a plan.
Presentation :
A homogeneous linear system with as many equations
as unknowns has a nontrivial solution if and only
if the determinant of the matrix is zero.
Let us calculate the equation of the plan passing through points P, Q and R:
c1 x + c2 y + c3 z + c4 = 0
This same equation with the points P(x1,y1,z1) Q(x2,y2,z2) and R(x3,y3,z3):
c1 x1 + c2 y1 + c3 z1 + c4 = 0
c1 x2 + c2 y2 + c3 z2 + c4 = 0
c1 x3 + c2 y3 + c3 z3 + c4 = 0
The system of four equations:
c1 x + c2 y + c3 z + c4 = 0
c1 x1 + c2 y1 + c3 z1 + c4 = 0
c1 x2 + c2 y2 + c3 z2 + c4 = 0
c1 x3 + c2 y3 + c3 z3 + c4 = 0
The determinant of the system:
|x y z 1|
|x1 y1 z1 1| = 0
|x2 y2 z2 1|
|x3 y3 z3 1|
The determinant in C language:
|1 1 1 1|
|x1 y1 z1 1| = 0
|x2 y2 z2 1|
|x3 y3 z3 1|
To calculate the coefficients of the equation of the plan, we use the cofactor expansion along the first row.
cof(R1,C1) x + cof(R1,C2) y + cof(R1,C3) Z + cof(R1,C4) = 0
This equation gives us the equation of the plan that passes through the three points P, Q and R.
Application
Delete this file at the end of the session.