// Numbas version: finer_feedback_settings {"name": "2x2 Matrices", "metadata": {"description": "
This exam looks at the determinatns and inverses of 2x2 matrices
", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "Determinant of a 2x2 Matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Mark Patterson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5064/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}], "tags": [], "metadata": {"description": "Exercises on calculating the determinant of 2x2 and 3x3 matrices.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Calculate the determinants of the following matrices.
", "advice": "To find the determinant of a $2\\times2$ matrix, we use the following formula
\n$$
\\begin{vmatrix}
a & b \\\\
c & d \\\\
\\end{vmatrix} = ad-bc
$$
Hence, we have:
\na)
\n$$
\\det \\boldsymbol{A} = \\var{maA[0][0]} \\times \\var{maA[1][1]} - \\var{maA[0][1]} \\times \\var{maa[1][0]} = \\var{det(maA)}
$$
b)
\n$$
\\det \\boldsymbol{B} = \\var{maB[0][0]} \\times \\var{maB[1][1]} - \\var{maB[0][1]} \\times \\var{maB[1][0]} = \\var{det(maB)}
$$
Calculate the determinant of the matrix:
\n$$
\\boldsymbol{A} = \\simplify{{maA}}
$$
$\\det \\boldsymbol{A} = $ [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "det(maA)", "maxValue": "det(maA)", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Calculate the determinant of the matrix:
\n$$
\\boldsymbol{B} = \\simplify{{maB}}
$$
$\\det \\boldsymbol{B} = $ [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "det(maB)", "maxValue": "det(maB)", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Inverse of a 2x2 matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}], "tags": [], "metadata": {"description": "Find the determinant and inverse of three $2 \\times 2$ invertible matrices.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Find the inverse of the following matrix:
", "advice": "To find the inverse of a matrix we first need to find the determinant:
\n$$
\\det \\boldsymbol{A} = \\var{a[0][0]} \\times \\var{a[1][1]} - \\var{a[0][1]} \\times \\var{a[1][0]} = \\var{det(a)}
$$
Since $\\det \\boldsymbol{A}\\neq 0$, we know that $\\boldsymbol{A}$ is invertible with:
\n$$
\\begin{aligned}
\\boldsymbol{A}^{-1} &= \\frac{1}{\\det \\boldsymbol{A}} \\begin{pmatrix} d & -b\\\\ -c& a \\end{pmatrix} \\\\
&= \\frac{1}{\\var{det(a)}} \\begin{pmatrix} \\var{a[1][1]} & \\var{-a[0][1]}\\\\ \\var{-a[1][0]}& \\var{a[0][0]} \\end{pmatrix} \\\\
\\end{aligned}
$$
Which gives us our inverse:
\n$$
\\simplify[fractionnumbers]{matrix:A^(-1)={inverse(a)}}
$$
Let:
\n$$
\\boldsymbol{A} = \\var{a}
$$
Calculate $\\boldsymbol{A}^{-1}$
\nInput all the elements of the matrix as fractions or integers and not as decimals.
\n$\\boldsymbol{A}^{-1} = $ [[0]]
", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "inverse(a)", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": "0.01", "markPerCell": false, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "2x2 Matrix Problems", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}, {"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}], "tags": [], "metadata": {"description": "Putting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Solve the set of simultaneous equations using matrices:
", "advice": "a)
\nBy using the coefficients of the variables in the equations, we can write the equations as:
\n$$
\\begin{pmatrix} \\var{a} & \\var{b}\\\\ \\var{a1}&\\var{b1} \\end{pmatrix} \\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\begin{pmatrix} \\var{c} \\\\ \\var{c1} \\end{pmatrix}
$$
Notice that carrying out the matrix multiplication will give you your system of equations.
\nb)
\nWe first find the determinant of $\\boldsymbol{A}$:
\n$$
\\det \\boldsymbol{A} = \\var{a} \\times \\var{b1} - \\var{b} \\times \\var{a1} = \\var{det}
$$
Since $\\det \\boldsymbol{A} \\neq 0$, $A$ is invertible with:
\n$$\\begin{aligned}
A^{-1} &= \\frac{1}{\\var{det}}\\begin{pmatrix}
{\\var{b1}}&{\\var{-b}} \\\\
{\\var{-a1}}&{\\var{a}}
\\end{pmatrix} \\\\
&= \\begin{pmatrix}
\\simplify[std]{{b1}/{det}}&\\simplify[std]{{-b}/{det}} \\\\
\\simplify[std]{{-a1}/{det}}&\\simplify[std]{{a}/{det}}
\\end{pmatrix}
\\end{aligned}
$$
c)
\nWe have the equation:
\n$$
A^{-1}b = \\begin{pmatrix}
\\simplify[std]{{b1}/{det}}&\\simplify[std]{{-b}/{det}} \\\\
\\simplify[std]{{-a1}/{det}}&\\simplify[std]{{a}/{det}}
\\end{pmatrix} \\begin{pmatrix}
\\var{c} \\\\
\\var{c1}
\\end{pmatrix}
$$
Using standard matrix multiplication, we can compute:
\n$$
A^{-1}b = \\begin{pmatrix}
\\simplify[std]{{b1}/{det}} \\times \\var{c} + \\simplify[std]{{-b}/{det}} \\times \\var{c1}\\\\
\\simplify[std]{{-a1}/{det}} \\times \\var{c} + \\simplify[std]{{a}/{det}} \\times \\var{c1}
\\end{pmatrix} = \\begin{pmatrix} \\simplify[std]{{c*b1-c1*b}/{det}}\\\\\\simplify[std]{{c1*a-c*a1}/{det}}\\end{pmatrix}
$$
d)
\nNotice that
\n$$
\\boldsymbol{A}v = b \\Rightarrow v = \\boldsymbol{A}^{-1}b
$$
Hence, we can use our solution to part $c)$ to find:
\n$$
\\begin{pmatrix}
x \\\\
y
\\end{pmatrix} = \\boldsymbol{A}^{-1}b = \\begin{pmatrix}
\\simplify[std]{{c*b1-c1*b}/{det}} \\\\
\\simplify[std]{{c1*a-c*a1}/{det}}
\\end{pmatrix}
$$
And therefore, we have:
\n$$
\\begin{eqnarray*} x&=& \\simplify[std]{{c*b1-c1*b}/{det}}\\\\ y&=& \\simplify[std]{{c1*a-c*a1}/{det}} \\end{eqnarray*}
$$
Write the following set of equations as a matrix equation:
$$
\\begin{eqnarray*} \\simplify[std]{{a}x+{b}y}&=&\\var{c}\\\\ \\simplify[std]{{a1}x+{b1}y}&=&\\var{c1} \\end{eqnarray*}
$$
That is, in the form:
\n$$
\\boldsymbol{A}v=b
$$
for some matrix $\\boldsymbol{A}$ and column vectors $v$ and $b$.
\n
[[0]]$
\\begin{pmatrix}
x \\\\
y \\\\
\\end{pmatrix} = \\ $[[1]]
Find the inverse of $\\boldsymbol{A}$, the $2 \\times 2$ matrix you defined in the previous question
\nInput all numbers as fractions or integers and not as decimals. Simplify your fractions as much as possible!
\n$\\boldsymbol{A}^{-1} = $ [[0]]
", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([\n [b1,-b],\n [-a1,a]\n])/det", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Using matrix multiplication and your answer to part $b)$, find $\\boldsymbol{A}^{-1}b$
\nGive your answer as fractions or integers and not as decimals.
\n$\\boldsymbol{A}^{-1}b = $ [[0]]
", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "1.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([{c*b1-c1*b}/{b1*a-a1*b}],[{-c*a1+c1*a}/{b1*a-a1*b}])", "correctAnswerFractions": true, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Using your answer to part $c)$, state the values of $x$ and $y$.
\nGive your answer as fractions or integers and not as decimals.
\n$x = $ [[0]]
\n$y = $ [[1]]
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{c*b1-c1*b}/{b1*a-a1*b}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "Input as a fraction or an integer, not as a decimal
"}, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 0.5, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{-c*a1+c1*a}/{b1*a-a1*b}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "Input as a fraction or an integer, not as a decimal
"}, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "typeendtoleave": false, "startpassword": "", "allowAttemptDownload": false, "downloadEncryptionKey": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "inreview"}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "type": "exam", "contributors": [{"name": "Tamsin Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/14108/"}, {"name": "Fraser Buxton", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/24224/"}], "extensions": [], "custom_part_types": [], "resources": []}