document.write( "Question 822764: Solve with gaussian elimination
\n" ); document.write( "2x+y+z=6
\n" ); document.write( "-3y-4y+2z=4
\n" ); document.write( "X+y-z=-2
\n" ); document.write( "

Algebra.Com's Answer #495097 by Edwin McCravy(20055)\"\" \"About 
You can put this solution on YOUR website!
\"system%282x+%2B+y+%2B+z=+6%2C%0D%0A-3x+-+4y+%2B+2z=+4%2C%0D%0Ax+%2B+y+-+z=+-2%29\"\r
\n" ); document.write( "\n" ); document.write( "
\r\n" );
document.write( "Write that as a matrix by dropping the letters\r\n" );
document.write( "and putting vertical line instead of equal signs:\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The idea is to get three zeros in the three positions\r\n" );
document.write( "in the lower left corner of the matrix, where the elements\r\n" );
document.write( "I've colored red are.\r\n" );
document.write( "\r\n" );
document.write( "Things will be easier if there is an easy way to get a 1 \r\n" );
document.write( "in the upper left corner.  We can do that by interchanging\r\n" );
document.write( "(swapping) rows 1 and 3.\r\n" );
document.write( "\r\n" );
document.write( "That operation is written:\r\n" );
document.write( "\r\n" );
document.write( "R1<->R3\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "To get a 0 where the red -3 on the left of the middle row is,\r\n" );
document.write( "multiply R1 by 3 and add it to 1 times R2, and put it in place \r\n" );
document.write( "of the present R2.  That's written as\r\n" );
document.write( "\r\n" );
document.write( "3R1+1R2->R2\r\n" );
document.write( "\r\n" );
document.write( "To make it easy, write the multipliers to the left of the two\r\n" );
document.write( "rows you're working with; that is, put a 3 by R1 and a 1 by R2\r\n" );
document.write( "\r\n" );
document.write( "\"matrix%283%2C1%2C3%2C1%2C%22%22%29\"\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "We are going to change only R2.  Although R1 gets multiplied\r\n" );
document.write( "by 3 we are going to just do that mentally and add it to R2, but\r\n" );
document.write( "not really change R1.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "-----\r\n" );
document.write( "\r\n" );
document.write( "To get a 0 where the red 2 is, multiply R1\r\n" );
document.write( "by -2 and add it to 1 times R3.  That's written as\r\n" );
document.write( "\r\n" );
document.write( "-2R1+1R3->R3\r\n" );
document.write( "\r\n" );
document.write( "Write the multipliers to the left of the two rows you're \r\n" );
document.write( "working with; that is, put a -2 by R1 and a 1 by R3\r\n" );
document.write( "\r\n" );
document.write( "\"matrix%283%2C1%2C-2%2C%22%22%2C1%29\"\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "We are going to change only R3. \r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "---------------\r\n" );
document.write( "It's a good idea, when it's easy, to\r\n" );
document.write( "get 1's on the diagonal.  So we'll\r\n" );
document.write( "multiply R2 by -1.\r\n" );
document.write( "\r\n" );
document.write( "That operation is written\r\n" );
document.write( "\r\n" );
document.write( "-1R2->R2\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "To get a 0 where the red -1 is, multiply R2\r\n" );
document.write( "by 1 and add it to 1 times R3.  That's written as\r\n" );
document.write( "\r\n" );
document.write( "1R2+1R3->R3\r\n" );
document.write( "\r\n" );
document.write( "Write the multipliers to the left of the two\r\n" );
document.write( "rows you're working with; that is, put a 1 by R2 and a 1 by R3\r\n" );
document.write( "\r\n" );
document.write( "\"matrix%283%2C1%2C%22%22%2C%221%22%2C1%29\"\r\n" );
document.write( "\r\n" );
document.write( "We are going to change only R3. \r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Now that we have 0's in the three positions in the\r\n" );
document.write( "lower left corner of the matrix, we change the matrix\r\n" );
document.write( "back to equations:\r\n" );
document.write( "\r\n" );
document.write( "\"system%28x%2By-z=-2%2Cy%2Bz=2%2C4z=12%29\"\r\n" );
document.write( "\r\n" );
document.write( "Solve the third equation for z:\r\n" );
document.write( "\r\n" );
document.write( "\"4z=12\"\r\n" );
document.write( "\"z=%2812%29%2F%284%29\"\r\n" );
document.write( "\"z=3\"\r\n" );
document.write( "\r\n" );
document.write( "Substitute 3 for z in the middle equation:\r\n" );
document.write( "\r\n" );
document.write( "\"y%2Bz=2\"\r\n" );
document.write( "\"y%2B%283%29=2\"\r\n" );
document.write( "\"y=-1\"\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Substitute 5 for z and 3 for y in the top equation:\r\n" );
document.write( "\r\n" );
document.write( "\"x%2By-z=-2\"\r\n" );
document.write( "\"x%2B%28-1%29-%283%29=-2\"\r\n" );
document.write( "\"x-1-3=-2\"\r\n" );
document.write( "\"x-4=-2\"\r\n" );
document.write( "\"x=2\"\r\n" );
document.write( "\r\n" );
document.write( "So the solution is \"%22%28x%2Cy%2Cz%29%22=%22%282%2C-1%2C3%29%22\"\r\n" );
document.write( "\r\n" );
document.write( "Edwin

\n" ); document.write( "
\n" ); document.write( "
\n" );