// Numbas version: exam_results_page_options {"name": "Gaussian Elimination", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"gaps": [{"matrix": [1, 0, 0, 0], "displayType": "radiogroup", "marks": 0, "showCorrectAnswer": true, "choices": ["

To make the arithmetic easier for ourselves even though it is not the best pivot.

", "

To make the Gaussian Elimination algorithm numerically stable you should always do this.

", "

The best pivot in this question is 1.

", "

I don't know.

"], "scripts": {}, "type": "1_n_2", "shuffleChoices": true, "displayColumns": 0, "maxMarks": 1, "distractors": ["", "", "", ""], "minMarks": 0}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "1", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "1", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{b}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{b}", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{b*a-b}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{b*a-b}", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{c3}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{c3}", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{a}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{a}", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{a*b-1}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{a*b-1}", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{a^2*b-a-a*b}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{a^2*b-a-a*b}", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{c2}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{c2}", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{a*c}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{a*c}", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{b*c}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{b*c}", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "1", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "1", "marks": 0.1}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{c1}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{c1}", "marks": 0.1}], "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "prompt": "

Re-arrange the rows so that the third row becomes the first row, the first the second and the second the third.
WHY? Choose one of the following:
[[0]]

\n

Now write down the entries of the matrix you will use for Gaussian Elimination, remember to include the constants as the last column.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\][[1]][[2]][[3]]\\[\\left| \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\][[4]]\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\]
[[5]][[6]][[7]][[8]]
[[9]][[10]][[11]][[12]]
"}, {"gaps": [{"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{-a}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{-a}", "marks": 0.4}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{-a*c}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{-a*c}", "marks": 0.4}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{-1}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{-1}", "marks": 0.3}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{-a}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{-a}", "marks": 0.3}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{c2-a*c3}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{c2-a*c3}", "marks": 0.3}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{c*b-c*b*a}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{c*b-c*b*a}", "marks": 0.3}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{-a^2*b*c+1+a*b*c}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{-a^2*b*c+1+a*b*c}", "marks": 0.3}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{c1-a*c*c3}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{c1-a*c*c3}", "marks": 0.3}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{-1}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{-1}", "marks": 0.4}], "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "prompt": "\n \n \n

Now introduce zeros in the first column below the first entry by adding:
[[0]] times the first row to the second row and
[[1]] times the first row to the third row to get the matrix:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] $\\var{1}$ $\\var{b}$ $\\var{b*a-b}$ \\[\\left| \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] $\\var{c3}$ \\[\\left) \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\]
$\\var{0}$ [[2]] [[3]] [[4]]
$\\var{0}$ [[5]] [[6]] [[7]]
\n \n \n \n

Next multiply the second row by [[8]] to get a 1 in the second entry in the second row.

\n \n \n \n \n "}, {"gaps": [{"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{-b*c+a*b*c}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{-b*c+a*b*c}", "marks": 0.4}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{a}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{a}", "marks": 0.4}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{a*c3-c2}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{a*c3-c2}", "marks": 0.4}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{1}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{1}", "marks": 0.4}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{b*c*(1-a)*(c2-a*c3)+c1-a*c*c3}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{b*c*(1-a)*(c2-a*c3)+c1-a*c*c3}", "marks": 0.4}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{z}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{z}", "marks": 1}], "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "prompt": "

(Note that from the last part, you may have multiplied the second row by a suitable number to get a $1$ in the second entry in the second row.)

\n


In this part we introduce a $0$ in the second column below the second entry in the second column by adding:
[[0]] times the second row to the third row to get the matrix:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\]$\\var{1}$$\\var{b}$$\\var{b*a-b}$\\[\\left| \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\]$\\var{c3}$\\[\\left) \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\]
$\\var{0}$$\\var{1}$[[1]][[2]]
$\\var{0}$$\\var{0}$[[3]][[4]]
\n

From this you should find:

\n

$z=\\;\\;$[[5]]

"}, {"gaps": [{"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{y}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{y}", "marks": 1.5}, {"scripts": {}, "correctAnswerFraction": false, "showPrecisionHint": false, "maxValue": "{x}", "showCorrectAnswer": true, "type": "numberentry", "allowFractions": false, "minValue": "{x}", "marks": 1.3}], "scripts": {}, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "prompt": "\n \n \n

From the second row of the reduced matrix you find an equation involving only $y$ and $z$ and using your value for $z$ we find:

\n \n \n \n

$y=\\;\\;$[[0]]

\n \n \n \n

Then using the first row we have the equation :
\\[\\simplify[all]{x+ {b}y+{b*a-b}z={c3}}\\]

\n \n \n \n

Using this you can now find $x$:

\n \n \n \n

$x=\\;\\;$[[1]]

\n \n \n \n \n "}], "name": "Gaussian Elimination", "metadata": {"notes": "

30/03/2015: NB for simplest algebra $a_{11}$ is made equal to 1, not stable pivoting. Changed the MCQ to highlight this.

\n

17/02/2013: JDP added augmented matrix bars

\n

5/07/2012:

\n

Added tags.

\n

Changed some of the grammar in the instructions.

\n

9/07/2012:

\n

Corrected tags. Note that tags are not case sensitive.

\n

Added more tags.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "

Solving a system of three linear equations in 3 unknowns using Gauss Elimination in 4 stages. Solutions are all integral.

"}, "statement": "

Solve the system of equations using Gaussian Elimination
\\[\\begin{eqnarray*} &\\var{a}x&+\\;&\\var{a*b-1}y&+\\;\\var{a^2*b-a-a*b}z&=&\\var{c2}\\\\ &\\var{a*c}x&+\\;&\\var{c*b}y&+\\;z&=&\\var{c1}\\\\ &x&+\\;&\\var{b}y&+\\;\\var{b*a-b}z&=&\\var{c3} \\end{eqnarray*} \\]
Part a) Rearrange the order of the equations and represent this as a system of equations using a matrix.
Part b) Introduce zeros in the first column using the first row.
Part c) Introduce zeros in the second coumn below the second entry in the second row using the second row.
Also need to solve for $z$ using the last row of the reduced matrix.
Part d) Solve for $y$ and $x$ using the second and first rows of the reduced matrix.

", "functions": {}, "type": "question", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"c1": {"templateType": "anything", "name": "c1", "description": "", "group": "Ungrouped variables", "definition": "random(1..5)"}, "b": {"templateType": "anything", "name": "b", "description": "", "group": "Ungrouped variables", "definition": "random(2..6)"}, "c3": {"templateType": "anything", "name": "c3", "description": "", "group": "Ungrouped variables", "definition": "random(1..3)"}, "c2": {"templateType": "anything", "name": "c2", "description": "", "group": "Ungrouped variables", "definition": "random(1..3)"}, "c": {"templateType": "anything", "name": "c", "description": "", "group": "Ungrouped variables", "definition": "random(1..3)"}, "x": {"templateType": "anything", "name": "x", "description": "", "group": "Ungrouped variables", "definition": "c3-(b*a-b)*z-b*y"}, "y": {"templateType": "anything", "name": "y", "description": "", "group": "Ungrouped variables", "definition": "a*c3-c2-a*z"}, "a": {"templateType": "anything", "name": "a", "description": "", "group": "Ungrouped variables", "definition": "random(2..6)"}, "z": {"templateType": "anything", "name": "z", "description": "", "group": "Ungrouped variables", "definition": "c1+c2*c*(b-a*b)+c3*c*(a^2*b-a-a*b)"}}, "preamble": {"js": "", "css": ""}, "tags": ["Gauss", "Gaussian elimination", "Linear equations", "MA4100", "Solving equations", "columns", "echelon form", "gauss", "gaussian elimination", "linear algebra", "linear equations", "ma4100", "matrix", "reduced matrix", "row operators", "rows", "solving a system of linear equations", "solving equations"], "variable_groups": [], "ungrouped_variables": ["a", "b", "c", "c1", "c2", "c3", "y", "x", "z"], "advice": "

Look at the revealed answers for this question. All the information needed is there.

", "question_groups": [{"pickQuestions": 0, "name": "", "pickingStrategy": "all-ordered", "questions": []}], "showQuestionGroupNames": false, "contributors": [{"name": "James Denholm-Price", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/17/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "James Denholm-Price", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/17/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}