Exploring Analyic Geometry with Mathematica® |
|||||
| Home | Contents | Commands | Packages | Explorations | Reference |
| Tour | Lines | Circles | Conics | Analysis | Tangents |
Cramer's Rule (Three Equations)
cramer3.html
Exploration
Show that the solution to the system of three linear equations in three unknowns
is given by
,
and
where
.
Approach
Use the Mathematica Det command to compute the appropriate determinants and then substitute the solutions back into the original equations to demonstrate that they solve the equations.
Initialize
To initialize Descarta2D, select the input cell bracket and press SHIFT-Enter.
This initialization assumes that the Descarta2D software has been copied into one of the standard directories for AddOns which are on the Mathematica search path, $Path.
<<Descarta2D`
Solution
Compute the necessary determinants.
Clear[a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3];
dx=Det[{{-d1,b1,c1},{-d2,b2,c2},{-d3,b3,c3}}];
dy=Det[{{a1,-d1,c1},{a2,-d2,c2},{a3,-d3,c3}}];
dz=Det[{{a1,b1,-d1},{a2,b2,-d2},{a3,b3,-d3}}];
dD=Det[{{a1,b1,c1},{a2,b2,c2},{a3,b3,c3}}];
Compute the solutions.
{x1,y1,z1}={dx/dD,dy/dD,dz/dD}//Simplify
Show that the solutions solve the original equations.
Clear[x,y];
{a1*x+b1*y+c1*z+d1,
a2*x+b2*y+c2*z+d2,
a3*x+b3*y+c3*z+d3} /.
{x->x1,y->y1,z->z1} //Simplify
Discussion
The Solve command produces the same result.
Clear[z];
Simplify[
Solve[{a1*x+b1*y+c1*z+d1==0,
a2*x+b2*y+c2*z+d2==0,
a3*x+b3*y+c3*z+d3==0},{x,y,z}]
]