<!DOCTYPE html>
<!--
Copyright 2011-16 Newcastle University

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<html lang="en-GB">
    <head>
        
    <title>STD 30MINS WM104 in class assessment part (ii) : matrices - Numbas</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/png" href="resources/numbas-icon.png"/>

    <!-- CSS -->
<style>
    /* This rule will be overriden in styles.css, so the page content is only shown when the stylesheet has loaded
    */
    @layer no-stylesheet {
        body > #with-stylesheet {
            display: none;
        }
    }
</style>
<link rel="stylesheet" type="text/css" href="numbas.css?build_time=1764942615.85272" />
    <!-- mathjax stuff -->
<script>
MathJax = {
    tex: {
        inlineMath: [['$', '$'], ['\\(', '\\)']],
        packages: {'[+]': ['numbas','texhtml']},
        allowTexHTML: true
    },
    loader: {
        load: ['[numbas]/numbas-mathjax.js?build_time=1764942615.85272', '[tex]/texhtml'],
        paths: {numbas: './scripts/standalone_scripts'},
        versionWarnings: false
    }
};
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-svg.js"></script>

<!-- numbas stuff -->
<script charset="UTF-8" type="text/javascript" src="numbas.js?build_time=1764942615.85272" charset="utf-8"></script>

<script>
    Numbas.queueScript('go',['start-exam'], function() {
        Numbas.locale.set_preferred_locale('en-GB');
    });
    if(document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', Numbas.checkAllScriptsLoaded);
    } else {
        Numbas.checkAllScriptsLoaded();
    }
    Numbas.get_exam_init_data = function() {
        return {
            source: "// Numbas version: finer_feedback_settings\n{\"name\": \"STD 30MINS WM104 in class assessment part (ii) : matrices\", \"metadata\": {\"description\": \"\u003cp\u003eMatrix addition, multiplication. Finding inverse. Determinants. Systems of equations.\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution 4.0 International\"}, \"duration\": 1800, \"percentPass\": 0, \"showQuestionGroupNames\": false, \"showstudentname\": true, \"question_groups\": [{\"name\": \"Group\", \"pickingStrategy\": \"all-ordered\", \"pickQuestions\": 1, \"questions\": [{\"name\": \"Add/Subtract 2 x 2 matrices\", \"extensions\": [\"stats\"], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Bill Foster\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/6/\"}, {\"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/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003eLinear combinations of $2 \\\\times 2$ matrices. Three examples.\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution 4.0 International\"}, \"statement\": \"\u003cp\u003eLet\u0026nbsp;\u003cbr/\u003e\\\\[A=\\\\simplify{{a}},\\\\;\\\\; B=\\\\simplify{{b}}\\\\;\\\\]\u003cbr/\u003eCalculate the following $2 \\\\times 2$ matrices:\u003c/p\u003e\\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\", \"advice\": \"\u003ch4\u003ea)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\begin{eqnarray*} \\\\simplify[std]{A+B} \u0026amp;=\u0026amp;\\\\simplify[std]{{a}+{b}}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\simplify[std]{{a[0][0]}+{b[0][0]}}\u0026amp;\u0026nbsp;\\\\simplify[std]{{a[0][1]}+{b[0][1]}}\\\\\\\\\u0026nbsp;\u0026nbsp;\\\\simplify[std]{{a[1][0]}+{b[1][0]}}\u0026amp;\\\\simplify[std]{{a[1][1]}+{b[1][1]}} \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp;\\\\simplify{{apb}}\\\\\\\\ \u0026nbsp;\\\\end{eqnarray*} \\\\]\u003c/p\u003e\\n\u003ch4\u003eb)\u0026nbsp;\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\begin{eqnarray*} \\\\simplify[std]{{p}A+{q}B} \u0026amp;=\u0026amp;\\\\simplify[std]{{p}{a}+{q}{b}}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\simplify[std]{{p}*{a[0][0]}+{q}*{b[0][0]}}\u0026amp;\u0026nbsp;\\\\simplify[std]{{p}*{a[0][1]}+{q}*{b[0][1]}}\\\\\\\\\u0026nbsp;\u0026nbsp;\\\\simplify[std]{{p}*{a[1][0]}+{q}*{b[1][0]}}\u0026amp;\\\\simplify[std]{{p}*{a[1][1]}+{q}*{b[1][1]}} \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp;\\\\simplify{{lcab}}\\\\\\\\ \u0026nbsp;\\\\end{eqnarray*} \\\\]\u003c/p\u003e\\n\u003ch4\u003ec)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\begin{eqnarray*} \\\\simplify[std]{{p1}A+{q1}B+{r1}C} \u0026amp;=\u0026amp;\\\\simplify[std]{{p1}{a}+{q1}{b}+{r1}{c}}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\simplify[std]{{p1}*{a[0][0]}+{q1}*{b[0][0]}+{r1}*{c[0][0]}}\u0026amp;\u0026nbsp;\\\\simplify[std]{{p1}*{a[0][1]}+{q1}*{b[0][1]}+{r1}*{c[0][1]}}\\\\\\\\\u0026nbsp;\u0026nbsp;\\\\simplify[std]{{p1}*{a[1][0]}+{q1}*{b[1][0]}+{r1}*{c[1][0]}}\u0026amp;\\\\simplify[std]{{p1}*{a[1][1]}+{q1}*{b[1][1]}+{r1}*{c[1][1]}} \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp;\\\\simplify{{lcabc}}\\\\\\\\ \u0026nbsp;\\\\end{eqnarray*} \\\\]\u003c/p\u003e\\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\", \"rulesets\": {\"std\": [\"all\", \"fractionNumbers\", \"!collectNumbers\", \"!noleadingminus\"]}, \"variables\": {\"a\": {\"name\": \"a\", \"group\": \"Ungrouped variables\", \"definition\": \"matrix(repeat(repeat(random(-5..5 except 0),2),2))\", \"description\": \"\", \"templateType\": \"anything\"}, \"q1\": {\"name\": \"q1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-6..6 except [0,1,-1,p1,q])\", \"description\": \"\", \"templateType\": \"anything\"}, \"c\": {\"name\": \"c\", \"group\": \"Ungrouped variables\", \"definition\": \"matrix(repeat(repeat(random(-5..5 except [0,a[0][0],b[0][0]]),2),2))\", \"description\": \"\", \"templateType\": \"anything\"}, \"b\": {\"name\": \"b\", \"group\": \"Ungrouped variables\", \"definition\": \"matrix(repeat(repeat(random(-5..5 except [0,a[0][0]]),2),2))\", \"description\": \"\", \"templateType\": \"anything\"}, \"r1\": {\"name\": \"r1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-6..6 except [0,1,-1,p1,q1])\", \"description\": \"\", \"templateType\": \"anything\"}, \"q\": {\"name\": \"q\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-6..6 except [0,1,-1,p])\", \"description\": \"\", \"templateType\": \"anything\"}, \"p\": {\"name\": \"p\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2..6)\", \"description\": \"\", \"templateType\": \"anything\"}, \"p1\": {\"name\": \"p1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2..6 except p)\", \"description\": \"\", \"templateType\": \"anything\"}, \"apb\": {\"name\": \"apb\", \"group\": \"Ungrouped variables\", \"definition\": \"a+b\", \"description\": \"\", \"templateType\": \"anything\"}, \"lcab\": {\"name\": \"lcab\", \"group\": \"Ungrouped variables\", \"definition\": \"p*a+q*b\", \"description\": \"\", \"templateType\": \"anything\"}, \"lcabc\": {\"name\": \"lcabc\", \"group\": \"Ungrouped variables\", \"definition\": \"p1*a+q1*b+r1*c\", \"description\": \"\", \"templateType\": \"anything\"}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"a\", \"q1\", \"c\", \"b\", \"r1\", \"q\", \"p\", \"p1\", \"apb\", \"lcab\", \"lcabc\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003e$\\\\mathrm{A}+\\\\mathrm{B} = \\\\simplify[std]{{a}+{b}} = $ [[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"correctAnswer\": \"apb\", \"correctAnswerFractions\": false, \"numRows\": \"2\", \"numColumns\": \"2\", \"allowResize\": false, \"tolerance\": 0, \"markPerCell\": false, \"allowFractions\": true}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": false, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"$\\\\simplify{{p}A+{q}B = {p}{a}+{q}{b}}=$ [[0]]\", \"gaps\": [{\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": false, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"correctAnswer\": \"lcab\", \"correctAnswerFractions\": false, \"numRows\": \"2\", \"numColumns\": \"2\", \"allowResize\": false, \"tolerance\": 0, \"markPerCell\": false, \"allowFractions\": false}], \"sortAnswers\": false}], \"type\": \"question\"}, {\"name\": \"Matrix Multiplication\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Bill Foster\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/6/\"}, {\"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/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003eMultiplication of $2 \\\\times 2$ matrices.\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution 4.0 International\"}, \"statement\": \"\\n  \\n  \\n  \u003cp\u003eDo the following matrix problems \u003cbr/\u003eLet \u003cbr/\u003e\\\\[A=\\\\begin{pmatrix} \\\\var{a11}\u0026#38;\\\\var{a12}\\\\\\\\ \\\\var{a21}\u0026#38;\\\\var{a22}\\\\\\\\ \\\\end{pmatrix},\\\\;\\\\;\\n  \\n  B=\\\\begin{pmatrix} \\\\var{b11}\u0026#38;\\\\var{b12}\\\\\\\\ \\\\var{b21}\u0026#38;\\\\var{b22}\\\\\\\\ \\\\end{pmatrix},\\\\;\\\\;\\n  \\n  C=\\\\begin{pmatrix} \\\\var{c11}\u0026#38;\\\\var{c12}\\\\\\\\ \\\\var{c21}\u0026#38;\\\\var{c22}\\\\\\\\ \\\\end{pmatrix}\\\\]\u003cbr/\u003eCalculate the following products of these matrices:\u003c/p\u003e\\n  \\n  \\n    \\n    \", \"advice\": \"\u003ch4\u003ea)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\begin{eqnarray*} AB \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\var{a11}\u0026amp;\\\\var{a12}\\\\\\\\ \\\\var{a21}\u0026amp;\\\\var{a22}\\\\\\\\ \\\\end{pmatrix}\\\\begin{pmatrix} \\\\var{b11}\u0026amp;\\\\var{b12}\\\\\\\\ \\\\var{b21}\u0026amp;\\\\var{b22}\\\\\\\\ \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\simplify[]{{a11}{b11}+{a12}{b21}}\u0026amp;\\\\simplify[]{{a11}{b12}+{a12}{b22}}\\\\\\\\ \\\\simplify[]{{a21}{b11}+{a22}{b21}}\u0026amp;\\\\simplify[]{{a21}{b12}+{a22}{b22}}\\\\\\\\ \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\var{ab11}\u0026amp;\\\\var{ab12}\\\\\\\\ \\\\var{ab21}\u0026amp;\\\\var{ab22}\\\\\\\\ \\\\end{pmatrix} \\\\end{eqnarray*} \\\\]\u003c/p\u003e\\n\u003ch4\u003eb)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\begin{eqnarray*} BA \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\var{b11}\u0026amp;\\\\var{b12}\\\\\\\\ \\\\var{b21}\u0026amp;\\\\var{b22}\\\\\\\\ \\\\end{pmatrix}\\\\begin{pmatrix} \\\\var{a11}\u0026amp;\\\\var{a12}\\\\\\\\ \\\\var{a21}\u0026amp;\\\\var{a22}\\\\\\\\ \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\simplify[]{{b11}{a11}+{b12}{a21}}\u0026amp;\\\\simplify[]{{b11}{a12}+{b12}{a22}}\\\\\\\\ \\\\simplify[]{{b21}{a11}+{b22}{a21}}\u0026amp;\\\\simplify[]{{b21}{a12}+{b22}{a22}}\\\\\\\\ \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\var{ba11}\u0026amp;\\\\var{ba12}\\\\\\\\ \\\\var{ba21}\u0026amp;\\\\var{ba22}\\\\\\\\ \\\\end{pmatrix} \\\\end{eqnarray*} \\\\]\u003c/p\u003e\\n\u003ch4\u003ec)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\begin{eqnarray*} CB \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\var{c11}\u0026amp;\\\\var{c12}\\\\\\\\ \\\\var{c21}\u0026amp;\\\\var{c22}\\\\\\\\ \\\\end{pmatrix}\\\\begin{pmatrix} \\\\var{b11}\u0026amp;\\\\var{b12}\\\\\\\\ \\\\var{b21}\u0026amp;\\\\var{b22}\\\\\\\\ \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\simplify[]{{c11}{b11}+{c12}{b21}}\u0026amp;\\\\simplify[]{{c11}{b12}+{c12}{b22}}\\\\\\\\ \\\\simplify[]{{c21}{b11}+{c22}{b21}}\u0026amp;\\\\simplify[]{{c21}{b12}+{a22}{b22}}\\\\\\\\ \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\var{cb11}\u0026amp;\\\\var{cb12}\\\\\\\\ \\\\var{cb21}\u0026amp;\\\\var{cb22}\\\\\\\\ \\\\end{pmatrix} \\\\end{eqnarray*} \\\\]\u003c/p\u003e\\n\u003ch4\u003ed)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\begin{eqnarray*} AC \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\var{a11}\u0026amp;\\\\var{a12}\\\\\\\\ \\\\var{a21}\u0026amp;\\\\var{a22}\\\\\\\\ \\\\end{pmatrix}\\\\begin{pmatrix} \\\\var{c11}\u0026amp;\\\\var{c12}\\\\\\\\ \\\\var{c21}\u0026amp;\\\\var{c22}\\\\\\\\ \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\simplify[]{{a11}{c11}+{a12}{c21}}\u0026amp;\\\\simplify[]{{a11}{c12}+{a12}{c22}}\\\\\\\\ \\\\simplify[]{{a21}{c11}+{a22}{c21}}\u0026amp;\\\\simplify[]{{a21}{c12}+{a22}{c22}}\\\\\\\\ \\\\end{pmatrix}\\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\var{ac11}\u0026amp;\\\\var{ac12}\\\\\\\\ \\\\var{ac21}\u0026amp;\\\\var{ac22}\\\\\\\\ \\\\end{pmatrix} \\\\end{eqnarray*} \\\\]\u003c/p\u003e\", \"rulesets\": {\"std\": [\"all\", \"fractionNumbers\", \"!collectNumbers\"]}, \"variables\": {\"ba21\": {\"name\": \"ba21\", \"group\": \"Ungrouped variables\", \"definition\": \"b21*a11+b22*a21\", \"description\": \"\", \"templateType\": \"anything\"}, \"a21\": {\"name\": \"a21\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-2..2)\", \"description\": \"\", \"templateType\": \"anything\"}, \"a22\": {\"name\": \"a22\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..3)\", \"description\": \"\", \"templateType\": \"anything\"}, \"ba22\": {\"name\": \"ba22\", \"group\": \"Ungrouped variables\", \"definition\": \"b21*a12+b22*a22\", \"description\": \"\", \"templateType\": \"anything\"}, \"cb21\": {\"name\": \"cb21\", \"group\": \"Ungrouped variables\", \"definition\": \"c21*b11+c22*b21\", \"description\": \"\", \"templateType\": \"anything\"}, \"b22\": {\"name\": \"b22\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-3..-1)\", \"description\": \"\", \"templateType\": \"anything\"}, \"b21\": {\"name\": \"b21\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2,3)\", \"description\": \"\", \"templateType\": \"anything\"}, \"cb22\": {\"name\": \"cb22\", \"group\": \"Ungrouped variables\", \"definition\": \"c21*b12+c22*b22\", \"description\": \"\", \"templateType\": \"anything\"}, \"ac22\": {\"name\": \"ac22\", \"group\": \"Ungrouped variables\", \"definition\": \"a21*c12+a22*c22\", \"description\": \"\", \"templateType\": \"anything\"}, \"ac21\": {\"name\": \"ac21\", \"group\": \"Ungrouped variables\", \"definition\": \"a21*c11+a22*c21\", \"description\": \"\", \"templateType\": \"anything\"}, \"ab22\": {\"name\": \"ab22\", \"group\": \"Ungrouped variables\", \"definition\": \"a21*b12+a22*b22\", \"description\": \"\", \"templateType\": \"anything\"}, \"ab21\": {\"name\": \"ab21\", \"group\": \"Ungrouped variables\", \"definition\": \"a21*b11+a22*b21\", \"description\": \"\", \"templateType\": \"anything\"}, \"b12\": {\"name\": \"b12\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-3..1)\", \"description\": \"\", \"templateType\": \"anything\"}, \"b11\": {\"name\": \"b11\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-3,-1,0,3)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c12\": {\"name\": \"c12\", \"group\": \"Ungrouped variables\", \"definition\": \"a12+b12\", \"description\": \"\", \"templateType\": \"anything\"}, \"c11\": {\"name\": \"c11\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,0,4)\", \"description\": \"\", \"templateType\": \"anything\"}, \"ab12\": {\"name\": \"ab12\", \"group\": \"Ungrouped variables\", \"definition\": \"a11*b12+a12*b22\", \"description\": \"\", \"templateType\": \"anything\"}, \"a11\": {\"name\": \"a11\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-2,1,2)\", \"description\": \"\", \"templateType\": \"anything\"}, \"cb11\": {\"name\": \"cb11\", \"group\": \"Ungrouped variables\", \"definition\": \"c11*b11+c12*b21\", \"description\": \"\", \"templateType\": \"anything\"}, \"cb12\": {\"name\": \"cb12\", \"group\": \"Ungrouped variables\", \"definition\": \"c11*b12+c12*b22\", \"description\": \"\", \"templateType\": \"anything\"}, \"a12\": {\"name\": \"a12\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..4)\", \"description\": \"\", \"templateType\": \"anything\"}, \"ab11\": {\"name\": \"ab11\", \"group\": \"Ungrouped variables\", \"definition\": \"a11*b11+a12*b21\", \"description\": \"\", \"templateType\": \"anything\"}, \"ba11\": {\"name\": \"ba11\", \"group\": \"Ungrouped variables\", \"definition\": \"b11*a11+b12*a21\", \"description\": \"\", \"templateType\": \"anything\"}, \"ba12\": {\"name\": \"ba12\", \"group\": \"Ungrouped variables\", \"definition\": \"b11*a12+b12*a22\", \"description\": \"\", \"templateType\": \"anything\"}, \"c22\": {\"name\": \"c22\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0,1)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c21\": {\"name\": \"c21\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2..5)\", \"description\": \"\", \"templateType\": \"anything\"}, \"ac12\": {\"name\": \"ac12\", \"group\": \"Ungrouped variables\", \"definition\": \"a11*c12+a12*c22\", \"description\": \"\", \"templateType\": \"anything\"}, \"ac11\": {\"name\": \"ac11\", \"group\": \"Ungrouped variables\", \"definition\": \"a11*c11+a12*c21\", \"description\": \"\", \"templateType\": \"anything\"}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"ba21\", \"a21\", \"a22\", \"ba22\", \"cb21\", \"b22\", \"b21\", \"cb22\", \"ac22\", \"ac21\", \"ab22\", \"ab21\", \"b12\", \"b11\", \"c12\", \"c11\", \"c22\", \"a11\", \"cb11\", \"cb12\", \"a12\", \"c21\", \"ba11\", \"ba12\", \"ab12\", \"ab11\", \"ac12\", \"ac11\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003e$AB = \\\\begin{pmatrix} \\\\var{a11}\u0026amp;\\\\var{a12}\\\\\\\\ \\\\var{a21}\u0026amp;\\\\var{a22}\\\\\\\\ \\\\end{pmatrix}\\\\begin{pmatrix} \\\\var{b11}\u0026amp;\\\\var{b12}\\\\\\\\ \\\\var{b21}\u0026amp;\\\\var{b22}\\\\\\\\ \\\\end{pmatrix} = $ [[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"correctAnswer\": \"matrix([\\n    [ab11,ab12],\\n    [ab21,ab22]\\n])\", \"correctAnswerFractions\": false, \"numRows\": \"2\", \"numColumns\": \"2\", \"allowResize\": false, \"tolerance\": 0, \"markPerCell\": false, \"allowFractions\": false}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003e$CB = \\\\begin{pmatrix} \\\\var{c11}\u0026amp;\\\\var{c12}\\\\\\\\ \\\\var{c21}\u0026amp;\\\\var{c22}\\\\\\\\ \\\\end{pmatrix} \\\\begin{pmatrix} \\\\var{b11}\u0026amp;\\\\var{b12}\\\\\\\\ \\\\var{b21}\u0026amp;\\\\var{b22}\\\\\\\\ \\\\end{pmatrix}=$\u0026nbsp;[[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"correctAnswer\": \"matrix([\\n    [cb11,cb12],\\n    [cb21,cb22]\\n])\", \"correctAnswerFractions\": false, \"numRows\": \"2\", \"numColumns\": \"2\", \"allowResize\": false, \"tolerance\": 0, \"markPerCell\": false, \"allowFractions\": false}], \"sortAnswers\": false}], \"type\": \"question\"}, {\"name\": \"Shaheen\u0027s copy of Shaheen\u0027s copy of Priyanka\u0027s copy of Find determinants and inverses of 2x2 matrices\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Newcastle University Mathematics and Statistics\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/697/\"}, {\"name\": \"Shaheen Charlwood\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/1819/\"}, {\"name\": \"Priyanka Pandya\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/4134/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003eFind the determinant and inverse of three $2 \\\\times 2$ invertible matrices.\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution 4.0 International\"}, \"statement\": \"\u003cp\u003eLet\u003c/p\u003e\\n\u003cp\u003e\\\\begin{align} \\\\mathbf{A} \u0026amp;= \\\\var{a}, \u0026amp; \\\\mathbf{B} \u0026amp;= \\\\var{b}, \u0026amp; \\\\mathbf{C} \u0026amp;= \\\\var{c} \\\\end{align}\u003c/p\u003e\", \"advice\": \"\u003ch4\u003eDeterminant of a $2 \\\\times 2$ matrix\u003c/h4\u003e\\n\u003cp\u003eThe determinant of a matrix $\\\\mathrm{M} = \\\\begin{pmatrix} a\u0026amp;b \\\\\\\\ c\u0026amp;d \\\\end{pmatrix}$ is given by\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\det\\\\left(\\\\mathrm{M}\\\\right) = ad-bc \\\\]\u003c/p\u003e\\n\u003cp\u003eIf we have two $n \\\\times n$ matrices $M$ and $N$, then\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\det\\\\left(\\\\mathrm{MN}\\\\right) = \\\\det\\\\left(\\\\mathrm{M}\\\\right)\\\\det\\\\left(\\\\mathrm{N}\\\\right) \\\\]\u003c/p\u003e\\n\u003cp\u003eAnd it follows that if we have a third matrix $P$,\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\det\\\\left(\\\\mathrm{MNP}\\\\right) = \\\\det\\\\left(\\\\mathrm{M}\\\\right)\\\\det\\\\left(\\\\mathrm{N}\\\\right)\\\\det\\\\left(\\\\mathrm{P}\\\\right) \\\\]\u003c/p\u003e\\n\u003ch4\u003ea)\u003c/h4\u003e\\n\u003cp\u003eThus for our example we have:\u003c/p\u003e\\n\u003cp\u003e\\\\begin{align}\u003cbr/\u003e\\\\det\\\\left(\\\\mathrm{A}\\\\right) \u0026amp;= \\\\simplify[]{{a11}*{a22}-{a12}*{a21} = {det(a)}} \\\\\\\\\u003cbr/\u003e\\\\det\\\\left(\\\\mathrm{B}\\\\right) \u0026amp;= \\\\simplify[]{{b11}*{b22}-{b12}*{b21} = {det(b)}} \\\\\\\\\u003cbr/\u003e\\\\det\\\\left(\\\\mathrm{C}\\\\right) \u0026amp;= \\\\simplify[]{{c11}*{c22}-{c12}*{c21} = {det(c)}}\u003cbr/\u003e\\\\end{align}\u003c/p\u003e\\n\u003cp\u003e\\\\begin{align}\u003cbr/\u003e\\\\det\\\\left( \\\\mathrm{ABC} \\\\right) \u0026amp;= \\\\det(\\\\mathrm{A}) \\\\det(\\\\mathrm{B}) \\\\det(\\\\mathrm{C}) \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\simplify[]{{det(a)}*{det(b)}*{det(c)}} \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\var{det(a*b*c)}\u003cbr/\u003e\\\\end{align}\u003c/p\u003e\\n\u003ch4\u003eInverse of a $2 \\\\times 2$ matrix\u003c/h4\u003e\\n\u003cp\u003eSuppose $\\\\mathrm{M} = \\\\begin{pmatrix} a\u0026amp;b \\\\\\\\ c\u0026amp;d \\\\end{pmatrix}$ is a $2 \\\\times 2$ matrix and $\\\\det\\\\left(\\\\mathrm{M}\\\\right) = \\\\Delta \\\\neq 0$.\u003c/p\u003e\\n\u003cp\u003eThen $\\\\mathrm{M}$ is invertible and\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\mathrm{M}^{-1} = \\\\frac{1}{\\\\Delta} \\\\begin{pmatrix} d \u0026amp; -b\\\\\\\\ -c\u0026amp; a \\\\end{pmatrix}=\\\\begin{pmatrix} \\\\frac{d}{\\\\Delta} \u0026amp; -\\\\frac{b}{\\\\Delta}\\\\\\\\ -\\\\frac{c}{\\\\Delta}\u0026amp; \\\\frac{a}{\\\\Delta} \\\\end{pmatrix}\\\\]\u003c/p\u003e\\n\u003cp\u003eApplying this to these examples we obtain:\u003c/p\u003e\\n\u003ch4\u003eb)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\simplify[fractionnumbers]{matrix:A^(-1)={inverse(a)}} \\\\]\u003c/p\u003e\\n\u003ch4\u003ec)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\simplify[fractionnumbers]{matrix:B^(-1)={inverse(b)}} \\\\]\u003c/p\u003e\\n\u003ch4\u003ed)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ \\\\simplify[fractionnumbers]{matrix:C^(-1)={inverse(c)}} \\\\]\u003c/p\u003e\", \"rulesets\": {\"std\": [\"all\", \"fractionNumbers\", \"!collectNumbers\"]}, \"variables\": {\"b22\": {\"name\": \"b22\", \"group\": \"Ungrouped variables\", \"definition\": \"if(tr3*b11=b21*b12,tr3+1,tr3)\", \"description\": \"\", \"templateType\": \"anything\"}, \"b21\": {\"name\": \"b21\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-6..6 except 0)\", \"description\": \"\", \"templateType\": \"anything\"}, \"tr2\": {\"name\": \"tr2\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..9)\", \"description\": \"\", \"templateType\": \"anything\"}, \"b\": {\"name\": \"b\", \"group\": \"Unnamed group\", \"definition\": \"matrix([ [b11,b12], [b21,b22] ])\", \"description\": \"\", \"templateType\": \"anything\"}, \"c\": {\"name\": \"c\", \"group\": \"Unnamed group\", \"definition\": \"matrix([ [c11,c12], [c21,c22] ])\", \"description\": \"\", \"templateType\": \"anything\"}, \"a22\": {\"name\": \"a22\", \"group\": \"Ungrouped variables\", \"definition\": \"if(tr1*a11=a21*a12,tr1+1,tr1)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c21\": {\"name\": \"c21\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2..5)\", \"description\": \"\", \"templateType\": \"anything\"}, \"tr3\": {\"name\": \"tr3\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-9..9 except 0)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c22\": {\"name\": \"c22\", \"group\": \"Ungrouped variables\", \"definition\": \"if(tr4*c11=c21*c12,tr4+1,tr4)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c11\": {\"name\": \"c11\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,2,4)\", \"description\": \"\", \"templateType\": \"anything\"}, \"tr4\": {\"name\": \"tr4\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..9)\", \"description\": \"\", \"templateType\": \"anything\"}, \"b11\": {\"name\": \"b11\", \"group\": \"Ungrouped variables\", \"definition\": \"if(a11=tr2,tr2+1,tr2)\", \"description\": \"\", \"templateType\": \"anything\"}, \"tr1\": {\"name\": \"tr1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..9)\", \"description\": \"\", \"templateType\": \"anything\"}, \"a\": {\"name\": \"a\", \"group\": \"Unnamed group\", \"definition\": \"matrix([ [a11,a12],[a21,a22] ])\", \"description\": \"\", \"templateType\": \"anything\"}, \"a12\": {\"name\": \"a12\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-5..5)\", \"description\": \"\", \"templateType\": \"anything\"}, \"b12\": {\"name\": \"b12\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-5..5)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c12\": {\"name\": \"c12\", \"group\": \"Ungrouped variables\", \"definition\": \"a12+b12\", \"description\": \"\", \"templateType\": \"anything\"}, \"a21\": {\"name\": \"a21\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-6..6 except 0)\", \"description\": \"\", \"templateType\": \"anything\"}, \"a11\": {\"name\": \"a11\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-9..9 except 0)\", \"description\": \"\", \"templateType\": \"anything\"}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"a11\", \"a12\", \"a21\", \"a22\", \"b11\", \"b12\", \"b21\", \"b22\", \"c11\", \"c12\", \"c21\", \"c22\", \"tr1\", \"tr2\", \"tr3\", \"tr4\"], \"variable_groups\": [{\"name\": \"Unnamed group\", \"variables\": [\"a\", \"b\", \"c\"]}], \"functions\": {\"inverse\": {\"parameters\": [[\"m\", \"matrix\"]], \"type\": \"matrix\", \"language\": \"jme\", \"definition\": \"matrix([\\n    [m[1][1], -m[0][1]],\\n    [-m[1][0], m[0][0]]\\n])/det(m)\"}}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003eCalculate the determinants of these matrices.\u003c/p\u003e\\n\u003cp\u003e$\\\\mathrm{det}\\\\left(A\\\\right) = $\u0026nbsp;[[0]]\u003c/p\u003e\\n\u003cp\u003e$\\\\mathrm{det}\\\\left(B\\\\right) = $\u0026nbsp;[[1]]\u003c/p\u003e\\n\u003cp\u003e$\\\\mathrm{det}\\\\left(C\\\\right) = $\u0026nbsp;[[2]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0.5, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"det(a)\", \"maxValue\": \"det(a)\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}, {\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0.5, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"det(b)\", \"maxValue\": \"det(b)\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}, {\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0.5, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"det(c)\", \"maxValue\": \"det(c)\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003eFind the inverses of the following matrices. Input all matrix entries as fractions or integers and not as decimals.\u003c/p\u003e\\n\u003cp\u003e$\\\\mathbf{A}^{-1} = $\u0026nbsp;[[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": \"2\", \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"correctAnswer\": \"inverse(a)\", \"correctAnswerFractions\": true, \"numRows\": \"2\", \"numColumns\": \"2\", \"allowResize\": false, \"tolerance\": 0, \"markPerCell\": false, \"allowFractions\": true}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003e$\\\\mathbf{B}^{-1} = $\u0026nbsp;[[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": \"2\", \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"correctAnswer\": \"inverse(b)\", \"correctAnswerFractions\": true, \"numRows\": \"2\", \"numColumns\": \"2\", \"allowResize\": false, \"tolerance\": 0, \"markPerCell\": false, \"allowFractions\": true}], \"sortAnswers\": false}], \"type\": \"question\"}, {\"name\": \"Shaheen\u0027s copy of Shaheen\u0027s copy of Andrew\u0027s copy of Matrices:  Inverse Matrix Method\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Andrew Dunbar\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/770/\"}, {\"name\": \"Shaheen Charlwood\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/1819/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003ePutting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix.\u0026nbsp;\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution 4.0 International\"}, \"statement\": \"\u003cp\u003eWrite the following equations as a matrix equation \u003cbr/\u003e\\\\[AX=b\\\\]for a matrix $A$ and column vectors $X$ and $b$\u003cbr/\u003e\\\\[ \\\\begin{eqnarray*} \\\\simplify[std]{{a}x+{b}y}\u0026amp;=\u0026amp;\\\\var{c}\\\\\\\\ \\\\simplify[std]{{a1}x+{b1}y}\u0026amp;=\u0026amp;\\\\var{c1} \\\\end{eqnarray*} \\\\]\u003c/p\u003e\", \"advice\": \"\u003ch4\u003ea)\u003c/h4\u003e\\n\u003cp\u003eThe equations can be written in the matrix form:\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\begin{pmatrix} \\\\var{a} \u0026amp; \\\\var{b}\\\\\\\\ \\\\var{a1}\u0026amp;\\\\var{b1} \\\\end{pmatrix} \\\\begin{pmatrix} x \\\\\\\\ y \\\\end{pmatrix} = \\\\begin{pmatrix} \\\\var{c} \\\\\\\\ \\\\var{c1} \\\\end{pmatrix}\\\\]\u003c/p\u003e\\n\u003ch4\u003eb)\u003c/h4\u003e\\n\u003cp\u003eSince $\\\\mathrm{det}(A) = \\\\simplify[]{{a}*{b1}-{b}*{a1}={dA}} \\\\neq 0$, $A$ is invertible and\u003c/p\u003e\\n\u003cp\u003e\\\\[A^{-1} = \\\\begin{pmatrix} \\\\simplify[std]{{b1}/{dA}}\u0026amp;\\\\simplify[std]{{-b}/{dA}}\\\\\\\\\\\\simplify[std]{{-a1}/{dA}}\u0026amp;\\\\simplify[std]{{a}/{dA}} \\\\end{pmatrix}\\\\]\u003c/p\u003e\\n\u003ch4\u003ec)\u003c/h4\u003e\\n\u003cp\u003eWe have:\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\begin{eqnarray*} A^{-1}b \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\simplify[std]{{b1}/{dA}}\u0026amp;\\\\simplify[std]{{-b}/{dA}}\\\\\\\\\\\\simplify[std]{{-a1}/{dA}}\u0026amp;\\\\simplify[std]{{a}/{dA}} \\\\end{pmatrix}\\\\begin{pmatrix} \\\\var{c}\\\\\\\\\\\\var{c1}\\\\end{pmatrix} \\\\\\\\ \u0026amp;=\u0026amp; \\\\begin{pmatrix} \\\\simplify[std]{{c*b1-c1*b}/{dA}}\\\\\\\\\\\\simplify[std]{{c1*a-c*a1}/{dA}}\\\\end{pmatrix} \\\\end{eqnarray*} \\\\]\u003c/p\u003e\\n\u003ch4\u003ed)\u003c/h4\u003e\\n\u003cp\u003eNote that $AX = b \\\\Rightarrow X = A^{-1}b$ hence we can read the solution from the last part as this gives:\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\begin{pmatrix} x\\\\\\\\y \\\\end{pmatrix} = \\\\begin{pmatrix} \\\\simplify[std]{{c*b1-c1*b}/{dA}}\\\\\\\\ \\\\simplify[std]{{c1*a-c*a1}/{dA}}\\\\end{pmatrix}\\\\]\u003c/p\u003e\\n\u003cp\u003eHence \\\\[\\\\begin{eqnarray*} x\u0026amp;=\u0026amp; \\\\simplify[std]{{c*b1-c1*b}/{dA}}\\\\\\\\ y\u0026amp;=\u0026amp; \\\\simplify[std]{{c1*a-c*a1}/{dA}} \\\\end{eqnarray*} \\\\]\u003c/p\u003e\", \"rulesets\": {\"std\": [\"all\", \"!collectNumbers\", \"fractionNumbers\", \"!noLeadingMinus\"]}, \"variables\": {\"c\": {\"name\": \"c\", \"group\": \"Ungrouped variables\", \"definition\": \"sc*random(1..9)\", \"description\": \"\", \"templateType\": \"anything\"}, \"sc1\": {\"name\": \"sc1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,-1)\", \"description\": \"\", \"templateType\": \"anything\"}, \"sa1\": {\"name\": \"sa1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,-1)\", \"description\": \"\", \"templateType\": \"anything\"}, \"sb1\": {\"name\": \"sb1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,-1)\", \"description\": \"\", \"templateType\": \"anything\"}, \"b\": {\"name\": \"b\", \"group\": \"Ungrouped variables\", \"definition\": \"sb*random(1..9)\", \"description\": \"\", \"templateType\": \"anything\"}, \"sb\": {\"name\": \"sb\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,-1)\", \"description\": \"\", \"templateType\": \"anything\"}, \"b1\": {\"name\": \"b1\", \"group\": \"Ungrouped variables\", \"definition\": \"if(ab=1,sb1*random(2..9),if(ab=2 or ab=4 or ab=8,sb1*random(1,3,5,7,9), if(ab=3 or ab=6 or ab=9,sb1*random(1,2,4,5,6,8),if(ab=5,sb1*random(1,2,3,4,6,7,8,9),sb1*random(1,2,3,4,5,6,8,9)))))\", \"description\": \"\", \"templateType\": \"anything\"}, \"a\": {\"name\": \"a\", \"group\": \"Ungrouped variables\", \"definition\": \"sa*random(1..9)\", \"description\": \"\", \"templateType\": \"anything\"}, \"test\": {\"name\": \"test\", \"group\": \"Ungrouped variables\", \"definition\": \"round(a*b1/b)\", \"description\": \"\", \"templateType\": \"anything\"}, \"sa\": {\"name\": \"sa\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,-1)\", \"description\": \"\", \"templateType\": \"anything\"}, \"ab\": {\"name\": \"ab\", \"group\": \"Ungrouped variables\", \"definition\": \"abs(b)\", \"description\": \"\", \"templateType\": \"anything\"}, \"inc\": {\"name\": \"inc\", \"group\": \"Ungrouped variables\", \"definition\": \"sa*random(1..9)\", \"description\": \"\", \"templateType\": \"anything\"}, \"a1\": {\"name\": \"a1\", \"group\": \"Ungrouped variables\", \"definition\": \"if(test+inc=0,test+inc+1,test+inc)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c1\": {\"name\": \"c1\", \"group\": \"Ungrouped variables\", \"definition\": \"sc1*random(1..9)\", \"description\": \"\", \"templateType\": \"anything\"}, \"addortakeaway\": {\"name\": \"addortakeaway\", \"group\": \"Ungrouped variables\", \"definition\": \"if(b*b1\u003c0,\u0027add the equation\u0027,\u0027take away the equation\u0027)\", \"description\": \"\", \"templateType\": \"anything\"}, \"da\": {\"name\": \"da\", \"group\": \"Ungrouped variables\", \"definition\": \"a*b1-a1*b\", \"description\": \"\", \"templateType\": \"anything\"}, \"sc\": {\"name\": \"sc\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,-1)\", \"description\": \"\", \"templateType\": \"anything\"}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"a\", \"addortakeaway\", \"c\", \"b\", \"da\", \"a1\", \"sc\", \"ab\", \"sb1\", \"b1\", \"test\", \"sb\", \"sa\", \"sc1\", \"sa1\", \"c1\", \"inc\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp style=\\\"text-align: center;\\\"\u003e$A = $\u0026nbsp;[[0]]\u003c/p\u003e\\n\u003ctable style=\\\"margin-left: auto; margin-right: auto;\\\"\u003e\\n\u003ctbody\u003e\\n\u003ctr\u003e\\n\u003ctd rowspan=\\\"2\\\"\u003e$X = \\\\;\\\\;\\\\Bigg($\u003c/td\u003e\\n\u003ctd\u003e[[1]]\u003c/td\u003e\\n\u003ctd rowspan=\\\"2\\\"\u003e$\\\\Bigg)$\u003c/td\u003e\\n\u003c/tr\u003e\\n\u003ctr\u003e\\n\u003ctd\u003e[[2]]\u003c/td\u003e\\n\u003c/tr\u003e\\n\u003c/tbody\u003e\\n\u003c/table\u003e\\n\u003cp style=\\\"text-align: center;\\\"\u003e$b = $\u0026nbsp;[[3]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"correctAnswer\": \"matrix([\\n    [a,b],\\n    [a1,b1]\\n])\", \"correctAnswerFractions\": false, \"numRows\": \"2\", \"numColumns\": \"2\", \"allowResize\": false, \"tolerance\": 0, \"markPerCell\": true, \"allowFractions\": true}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": \"0.25\", \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"answer\": \"x\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": true, \"valuegenerators\": [{\"name\": \"x\", \"value\": \"\"}]}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": \"0.25\", \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"answer\": \"y\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": true, \"valuegenerators\": [{\"name\": \"y\", \"value\": \"\"}]}, {\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": \"0.5\", \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"correctAnswer\": \"matrix([\\n    [c],\\n    [c1]\\n])\", \"correctAnswerFractions\": true, \"numRows\": \"2\", \"numColumns\": 1, \"allowResize\": false, \"tolerance\": 0, \"markPerCell\": true, \"allowFractions\": true}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003e\u003cspan\u003eFind the inverse of $A$. \u003c/span\u003e\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\u003cspan\u003eInput all numbers as fractions or integers (not decimals). \u003c/span\u003e\u003c/li\u003e\\n\u003cli\u003e\u003cspan\u003eYou do not need to simplify any fractions.\u003c/span\u003e\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e$A^{-1} = $\u0026nbsp;[[1]][[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": \"2\", \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"correctAnswer\": \"matrix([\\n    [b1,-b],\\n    [-a1,a]\\n])\", \"correctAnswerFractions\": true, \"numRows\": \"2\", \"numColumns\": \"2\", \"allowResize\": false, \"tolerance\": 0, \"markPerCell\": true, \"allowFractions\": true}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"answer\": \"1/{da}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"valuegenerators\": []}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003eCalculate the following:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003eInput your answers as integers or fractions (not decimals).\u003c/li\u003e\\n\u003cli\u003eYou do not need to simplify fractions.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e$A^{-1}b = $\u0026nbsp;[[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"matrix\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"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}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003eNow solve the equations, inputting your answers as fractions or integers (not decimals).\u003c/p\u003e\\n\u003cp\u003e\u003cbr/\u003e$x = \\\\;\\\\;$[[0]]\u003c/p\u003e\\n\u003cp\u003e$y = \\\\;\\\\;$[[1]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": \"0.25\", \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"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, \"notallowed\": {\"strings\": [\".\"], \"showStrings\": false, \"partialCredit\": 0, \"message\": \"\u003cp\u003eInput as a fraction or an integer, not as a decimal\u003c/p\u003e\"}, \"valuegenerators\": []}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": \"0.25\", \"showCorrectAnswer\": true, \"showFeedbackIcon\": false, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"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, \"notallowed\": {\"strings\": [\".\"], \"showStrings\": false, \"partialCredit\": 0, \"message\": \"\u003cp\u003eInput as a fraction or an integer, not as a decimal\u003c/p\u003e\"}, \"valuegenerators\": []}], \"sortAnswers\": false}], \"type\": \"question\"}, {\"name\": \"Shaheen\u0027s copy of Cramers Rule 3x3\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [\"question-resources/Cramers.PNG\"], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Shaheen Charlwood\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/1819/\"}, {\"name\": \"Marisa Llorens\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/2155/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003eCramers Rule applied to 3 simultaneous equations\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution 4.0 International\"}, \"statement\": \"\u003cp\u003e\u003cimg width=\\\"876\\\" height=\\\"362\\\" src=\\\"resources/question-resources/Cramers.PNG\\\"/\u003e\u003c/p\u003e\\n\u003cp\u003eUsing Cramer\u0027s rule (above), solve these simultaneous equations:\u003c/p\u003e\\n\u003cp\u003e$\\\\var{a11}x+\\\\var{a12}y+\\\\var{a13}z=\\\\var{c1}$\u003c/p\u003e\\n\u003cp\u003e$\\\\var{a21}x+\\\\var{a22}y+\\\\var{a23}z=\\\\var{c2}$\u003c/p\u003e\\n\u003cp\u003e$\\\\var{a31}x+\\\\var{a32}y+\\\\var{a33}z=\\\\var{c3}$\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\", \"advice\": \"\u003cp\u003eIf \\\\[\u0026nbsp; A=\\\\left( \\\\begin{array}{ccc}\u003cbr/\u003ea_{11} \u0026amp;\u0026nbsp;a_{12} \u0026amp; a_{13} \\\\\\\\a_{21} \u0026amp;\u0026nbsp;a_{22} \u0026amp; a_{23}\\\\\\\\ a_{31} \u0026amp;\u0026nbsp;a_{32} \u0026amp; a_{33}\\\\end{array} \\\\right),\\\\]\u003c/p\u003e\\n\u003cp\u003e\\\\[\u0026nbsp; C=\\\\left( \\\\begin{array}{ccc}\u003cbr/\u003ec_{1} \\\\\\\\\u0026nbsp;c_{2}\u0026nbsp;\\\\\\\\c_{3} \\\\end{array} \\\\right),\\\\]\u003c/p\u003e\\n\u003cp\u003eCramer\u0027s Rule : ${x_1}=\\\\frac{\\\\Delta_1}{\\\\Delta_0}$ ,\u0026nbsp; ${x_2}=\\\\frac{\\\\Delta_2}{\\\\Delta_0}$ , ${x_3}=\\\\frac{\\\\Delta_3}{\\\\Delta_0}$\u003c/p\u003e\\n\u003cp\u003eWhere:\\\\[ \\\\Delta_0=\\\\left| \\\\begin{array}{ccc}\u003cbr/\u003ea_{11} \u0026amp;\u0026nbsp;a_{12} \u0026amp; a_{13} \\\\\\\\a_{21} \u0026amp;\u0026nbsp;a_{22} \u0026amp; a_{23}\\\\\\\\ a_{31} \u0026amp;\u0026nbsp;a_{32} \u0026amp; a_{33}\\\\end{array} \\\\right|\\\\]\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\Delta_1=\\\\left| \\\\begin{array}{ccc}\u003cbr/\u003ec_{1} \u0026amp;\u0026nbsp;a_{12} \u0026amp; a_{13} \\\\\\\\c_{2} \u0026amp;\u0026nbsp;a_{22} \u0026amp; a_{23}\\\\\\\\ c_{3} \u0026amp;\u0026nbsp;a_{32} \u0026amp; a_{33}\\\\end{array} \\\\right|\\\\]\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\Delta_2=\\\\left| \\\\begin{array}{ccc}\u003cbr/\u003ea_{11} \u0026amp;\u0026nbsp;c_{1} \u0026amp; a_{13} \\\\\\\\a_{21} \u0026amp;\u0026nbsp;c_{2} \u0026amp; a_{23}\\\\\\\\ a_{31} \u0026amp;\u0026nbsp;c_{3} \u0026amp; a_{33}\\\\end{array} \\\\right|\\\\]\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\Delta_3=\\\\left| \\\\begin{array}{ccc}\u003cbr/\u003ea_{11} \u0026amp;\u0026nbsp;a_{12} \u0026amp; c_{1} \\\\\\\\a_{21} \u0026amp;\u0026nbsp;a_{22} \u0026amp; c_{2}\\\\\\\\ a_{31} \u0026amp;\u0026nbsp;a_{32} \u0026amp; c_{3}\\\\end{array} \\\\right|\\\\]\u003c/p\u003e\\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\u003cspan class=\\\"nb\\\"\u003e\u003cspan class=\\\"k\\\"\u003e\u003cspan class=\\\"s\\\"\u003e\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\", \"rulesets\": {}, \"variables\": {\"matrixA2\": {\"name\": \"matrixA2\", \"group\": \"Cramer determinants\", \"definition\": \"matrix([a11,c1,a13],[a21,c2,a23],[a31,c3,a33])\", \"description\": \"\", \"templateType\": \"anything\"}, \"a33\": {\"name\": \"a33\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0..10)\", \"description\": \"\", \"templateType\": \"anything\"}, \"a22\": {\"name\": \"a22\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0..10 except(a21*a12/a11))\", \"description\": \"\", \"templateType\": \"anything\"}, \"matrixA3\": {\"name\": \"matrixA3\", \"group\": \"Cramer determinants\", \"definition\": \"matrix([a11,a12,c1],[a21,a22,c2],[a31,a32,c3])\", \"description\": \"\", \"templateType\": \"anything\"}, \"matrixA1\": {\"name\": \"matrixA1\", \"group\": \"Cramer determinants\", \"definition\": \"matrix([c1,a12,a13],[c2,a22,a23],[c3,a32,a33])\", \"description\": \"\", \"templateType\": \"anything\"}, \"a31\": {\"name\": \"a31\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0..10)\", \"description\": \"\", \"templateType\": \"anything\"}, \"a32\": {\"name\": \"a32\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0..10)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c3\": {\"name\": \"c3\", \"group\": \"Ungrouped variables\", \"definition\": \"a31*x1+a32*x2+a33*x3\", \"description\": \"\", \"templateType\": \"anything\"}, \"x2\": {\"name\": \"x2\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-10..10 except 0)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c2\": {\"name\": \"c2\", \"group\": \"Ungrouped variables\", \"definition\": \"a21*x1+a22*x2+a23*x3\", \"description\": \"\", \"templateType\": \"anything\"}, \"a11\": {\"name\": \"a11\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0..10)\", \"description\": \"\", \"templateType\": \"anything\"}, \"a23\": {\"name\": \"a23\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0..10)\", \"description\": \"\", \"templateType\": \"anything\"}, \"matrixA\": {\"name\": \"matrixA\", \"group\": \"Ungrouped variables\", \"definition\": \"matrix([a11,a12,a13],[a21,a22,a23],[a31,a32,a33])\", \"description\": \"\", \"templateType\": \"anything\"}, \"a13\": {\"name\": \"a13\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0..10)\", \"description\": \"\", \"templateType\": \"anything\"}, \"a12\": {\"name\": \"a12\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0..10)\", \"description\": \"\", \"templateType\": \"anything\"}, \"x3\": {\"name\": \"x3\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-10..10 except 0)\", \"description\": \"\", \"templateType\": \"anything\"}, \"a21\": {\"name\": \"a21\", \"group\": \"Ungrouped variables\", \"definition\": \"random(0..10)\", \"description\": \"\", \"templateType\": \"anything\"}, \"x1\": {\"name\": \"x1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-10..10 except 0)\", \"description\": \"\", \"templateType\": \"anything\"}, \"c1\": {\"name\": \"c1\", \"group\": \"Ungrouped variables\", \"definition\": \"a11*x1+a12*x2+a13*x3\", \"description\": \"\", \"templateType\": \"anything\"}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"matrixA\", \"a11\", \"a12\", \"a21\", \"a22\", \"a13\", \"a23\", \"a31\", \"a32\", \"a33\", \"x1\", \"x2\", \"x3\", \"c1\", \"c2\", \"c3\"], \"variable_groups\": [{\"name\": \"Cramer determinants\", \"variables\": [\"matrixA1\", \"matrixA2\", \"matrixA3\"]}], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003eWhat is the determinant of $\\\\var{matrixA}$?\u003c/p\u003e\\n\u003cp\u003e[[0]]\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003eNOTE : IF YOU GET A DETERMINANT OF ZERO FOR THIS ANSWER PLEASE ALERT THE INVIGILATOR.\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"det(matrixA)\", \"maxValue\": \"det(matrixA)\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003eCalculate\u0026nbsp;$\\\\Delta_x=$ [[0]]\u003c/p\u003e\\n\u003cp\u003eHence, calculate $x=$\u0026nbsp; [[1]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"det(matrixA1)\", \"maxValue\": \"det(matrixA1)\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}, {\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"{x1}\", \"maxValue\": \"{x1}\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp\u003eCalculate\u0026nbsp;$\\\\Delta_y=$[[0]]\u003c/p\u003e\\n\u003cp\u003eHence, calculate ${y=}$\u0026nbsp; [[1]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"det(matrixA2)\", \"maxValue\": \"det(matrixA2)\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}, {\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"{x2}\", \"maxValue\": \"{x2}\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"prompt\": \"\u003cp style=\\\"text-align: left;\\\"\u003eCalculate\u0026nbsp;$\\\\Delta_z=$[[0]]\u003c/p\u003e\\n\u003cp\u003eHence, calculate $z=$\u0026nbsp; [[1]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"det(matrixA3)\", \"maxValue\": \"det(matrixA3)\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}, {\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"scripts\": {}, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"adaptiveMarkingPenalty\": 0, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"minValue\": \"{x3}\", \"maxValue\": \"{x3}\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}], \"type\": \"question\"}]}], \"navigation\": {\"allowregen\": false, \"reverse\": true, \"browse\": true, \"allowsteps\": true, \"showfrontpage\": true, \"showresultspage\": \"oncompletion\", \"onleave\": {\"action\": \"warnifunattempted\", \"message\": \"\u003cp\u003eYou have not answered this question!\u003c/p\u003e\"}, \"preventleave\": true, \"startpassword\": \"MATii\"}, \"timing\": {\"allowPause\": false, \"timeout\": {\"action\": \"warn\", \"message\": \"\u003cp\u003eThe matrices part of your in-class assessment is now finished .\u003c/p\u003e\"}, \"timedwarning\": {\"action\": \"warn\", \"message\": \"\u003cp\u003eYou have 5 minutes left to complete your matrices assessment.\u003c/p\u003e\"}}, \"feedback\": {\"showactualmark\": false, \"showtotalmark\": true, \"showanswerstate\": false, \"allowrevealanswer\": false, \"advicethreshold\": 0, \"intro\": \"\u003cp\u003eThis part of the in-class assessment\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003eassesses matrices: matrix arithmetic, determinants and inverses, solving simultaneous equations using matrix methods\u0026nbsp;\u003c/li\u003e\\n\u003cli\u003eis worth 20% of your overall WM104 module mark.\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003eAnswer all of the questions.\u003c/p\u003e\\n\u003cp\u003eIf you need anything during the test please raise your hand to alert the invigilator.\u003c/p\u003e\\n\u003cp\u003eYou may use rough paper for your calculations before inputting your answers.\u003c/p\u003e\\n\u003cp\u003eRemember to use the correct format (as stated in the question) for your answer.\u003c/p\u003e\", \"feedbackmessages\": [], \"enterreviewmodeimmediately\": true, \"showexpectedanswerswhen\": \"inreview\", \"showpartfeedbackmessageswhen\": \"oncompletion\", \"showactualmarkwhen\": \"oncompletion\", \"showtotalmarkwhen\": \"always\", \"showanswerstatewhen\": \"oncompletion\", \"showadvicewhen\": \"never\"}, \"type\": \"exam\", \"contributors\": [{\"name\": \"Marie Nicholson\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/1799/\"}, {\"name\": \"Shaheen Charlwood\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/1819/\"}], \"extensions\": [\"stats\"], \"custom_part_types\": [], \"resources\": [[\"question-resources/Cramers.PNG\", \"/srv/numbas/media/question-resources/Cramers.PNG\"]]}",
            extension_data: "{\"stats\": {\"root\": \"extensions/stats\", \"stylesheets\": [], \"javascripts\": [\"stats.js\"]}}"
        }
    }
</script>



	</head>
	
    <body>
        <template id="numbas-exam-template">
    
    <style id="numbas-style">@import 'numbas.css?build_time=1764942615.85272';</style>
    
    <exam-container class="numbas-container" data-bind="with: exam, css: css, attr: attr">
        <div id="loading">
    <img class="logo center-block" src="resources/numbas-logo.svg" alt="Numbas"/>
    <progress min="0" max="100" value="0"></progress>
    <span class="loading-text" data-localise="page.loading">Loading...</span>
</div>
        <!-- modal dialog boxes -->
<dialog id="saving" data-bind="modal: saving">
    <div class="text" data-localise="page.saving"></div>
</dialog>
<dialog class="modal" id="alert-modal" aria-labelledby="alert-modal-title" aria-describedby="alert-modal-body" data-bind="modal: {submit: $root.modal.ok}">
    <section>
        <header>
            <h2 id="alert-modal-title" data-localise="modal.alert"></h2>
        </header>

        <div class="modal-body" id="alert-modal-body"></div>

        <footer>
            <form method="dialog">
                <button value="ok" autofocus class="ok btn primary" data-localise="modal.ok"></button>
            </form>
        </footer>
    </section>
</dialog>

<dialog class="modal" id="confirm-modal" aria-labelledby="confirm-modal-title" aria-describedby="confirm-modal-body" data-bind="modal: {submit: $root.modal.ok, cancel: $root.modal.cancel}">
    <section>
        <header>
            <h2 id="confirm-modal-title" data-localise="modal.confirm"></h2>
        </header>
        <div class="modal-body" id="confirm-modal-body">
        </div>
        <footer>
            <form method="dialog">
                <button autofocus class="cancel btn" value="cancel" data-localise="modal.cancel"></button>
                <button value="ok" class="ok btn primary" data-localise="modal.ok"></button>
            </form>
        </footer>
    </section>
</dialog>
<dialog class="modal" id="confirm-end-exam-modal" aria-labelledby="confirm-end-exam-modal-title" aria-describedby="confirm-end-exam-modal-body" data-bind="modal: {submit: $root.modal.ok, cancel: $root.modal.cancel}">
    <form method="dialog">
        <header>
            <h4 id="confirm-end-exam-modal-title" data-localise="modal.confirm"></h4>
        </header>
        <div class="modal-body" id="confirm-end-exam-modal-body" data-bind="with: $root.exam">
            <p id="confirm-end-exam-modal-message"></p>
            <form class="form-inline" data-bind="submit: $root.modal.ok">
                <label for="confirm-end-text-input" id="confirm-end-exam-modal-input-message"></label>
                <input autofocus id="confirm-end-text-input" type="text" data-bind="textInput: confirmEndHandler.value, autosize: confirmEndHandler.value">
                <span class="password-feedback feedback-icon" data-bind="css: confirmEndHandler.feedback().iconClass, attr: {title: confirmEndHandler.feedback().title}"></span>
            </form>
        </div>
        <footer>
            <button value="cancel" class="cancel btn" data-localise="modal.cancel"></button>
            <button value="ok" class="ok btn primary" data-bind="disable: !confirmEndHandler.valid(), css: confirmEndHandler.feedback().buttonClass" data-localise="modal.end exam button"></button>
        </footer>
    </form>
</dialog>
<dialog class="modal force-default-style" id="style-modal" aria-labelledby="style-modal-title" aria-describedby="style-modal-explanation" data-bind="with: $root.style_customiser, modal: {submit: $root.saveStyle}">
    <form method="dialog">
        <header>
            <h4 id="style-modal-title" data-localise="control.style options"></h4>
        </header>

        
        <p class="help-block" id="style-modal-explanation" data-localise="modal.style.explanation"></p>

        <p class="help-block warning" data-bind="visible: forced_colors" data-localise="modal.forced colours warning"></p>

        
        <section class="style-controls">
            <fieldset>
                <label for="main-font-picker" data-localise="modal.style.main font"></label>
                <select id="main-font-picker" data-bind="value: staged_style['--main-font'], options: font_options, optionsText: 'label', optionsValue: 'name'">
                </select>
            </fieldset>
            <fieldset>
                <label for="text-size-picker" data-localise="modal.style.text size"></label>
                <input id="text-size-picker" type="number" step="0.1" min="0.5" max="4" data-bind="value: staged_style['--text-size']">
                <output id="text-size-preview" class="big" data-localise="modal.style.text preview"></output>
            </fieldset>
            <fieldset>
                <label for="font-weight-picker" data-localise="modal.style.font weight"></label>
                <input id="font-weight-picker" type="range" step="100" min="200" max="800" data-bind="value: staged_style['--font-weight'], valueUpdate: 'input'">
                <output id="font-weight-preview" data-bind="text: staged_style['--font-weight']"></output>
            </fieldset>
            <fieldset>
                <label for="spacing-picker" data-localise="modal.style.spacing"></label>
                <input id="spacing-picker" type="range" step="0.1" min="0.1" max="3" data-bind="value: staged_style['--spacing-scale'], valueUpdate: 'input'">
                <output id="spacing-preview" data-bind="percentage: parseFloat(staged_style['--spacing-scale']())"></output>
            </fieldset>
            <fieldset>
                <label for="color-scheme-picker" data-localise="modal.style.colour scheme"></label>
                <select id="color-scheme-picker" data-bind="value: color_scheme">
                    <option value="automatic" data-localise="modal.style.automatic colour scheme"></option>
                    <option value="light" data-localise="modal.style.light colour scheme"></option>
                    <option value="dark" data-localise="modal.style.dark colour scheme"></option>
                    <option value="custom" data-localise="modal.style.custom colour scheme"></option>
                </select>
            </fieldset>
            <fieldset>
                <label for="invert-images" data-localise="modal.style.invert images in dark mode"></label>
                <input id="invert-images" type="checkbox" data-bind="checked: invert_images">
            </fieldset>
        </section>

        <section class="style-controls" data-bind="visible: using_custom_color_scheme">
            <fieldset>
                <label for="background-colour-picker" data-localise="modal.style.background colour"></label>
                <input id="background-colour-picker" type="color" data-bind="value: style['--custom-background-color']">
            </fieldset>
            <fieldset>
                <label for="text-colour-picker" data-localise="modal.style.text colour"></label>
                <input id="text-colour-picker" type="color" data-bind="value: style['--custom-text-color']">
            </fieldset>
            <fieldset>
                <label for="main-colour-picker" data-localise="modal.style.main colour"></label>
                <input id="main-colour-picker" type="color" data-bind="value: style['--custom-main-color']">
            </fieldset>
            <fieldset>
                <label for="primary-colour-picker" data-localise="modal.style.primary colour"></label>
                <input id="primary-colour-picker" type="color" data-bind="value: style['--custom-primary-color']">
            </fieldset>
            <fieldset>
                <label for="link-colour-picker" data-localise="modal.style.link colour"></label>
                <input id="link-colour-picker" type="color" data-bind="value: style['--custom-link-color']">
            </fieldset>
            <fieldset>
                <label for="success-colour-picker" data-localise="modal.style.success colour"></label>
                <input id="success-colour-picker" type="color" data-bind="value: style['--custom-success-color']">
            </fieldset>
            <fieldset>
                <label for="info-colour-picker" data-localise="modal.style.info colour"></label>
                <input id="info-colour-picker" type="color" data-bind="value: style['--custom-info-color']">
            </fieldset>
            <fieldset>
                <label for="warning-colour-picker" data-localise="modal.style.warning colour"></label>
                <input id="warning-colour-picker" type="color" data-bind="value: style['--custom-warning-color']">
            </fieldset>
            <fieldset>
                <label for="danger-colour-picker" data-localise="modal.style.danger colour"></label>
                <input id="danger-colour-picker" type="color" data-bind="value: style['--custom-danger-color']">
            </fieldset>
            <fieldset>
                <label for="muted-colour-picker" data-localise="modal.style.muted colour"></label>
                <input id="muted-colour-picker" type="color" data-bind="value: style['--custom-muted-color']">
            </fieldset>
            <fieldset>
                <label for="highlight-colour-picker" data-localise="modal.style.highlight colour"></label>
                <input id="highlight-colour-picker" type="color" data-bind="value: style['--custom-highlight-color']">
            </fieldset>
        </section>

        

        

        
        <hr/>
        <p class="help-block"><a href="https://docs.numbas.org.uk/en/latest/accessibility/exam.html" target="_blank" data-localise="accessibility statement"></a></p>
        

        <footer>
            <button type="button" class="btn danger sm" data-localise="modal.style.reset to defaults" data-bind="click: reset"></button>
            <button class="cancel btn" value="cancel" autofocus data-localise="modal.cancel"></button>
            <button value="ok" class="ok btn primary" data-localise="modal.ok"></button>
        </footer>
    </form>
</dialog>
<dialog class="modal" id="next-actions-modal" aria-labelledby="next-actions-modal-title">
    <form method="dialog" data-bind="with: diagnostic_next_actions">
        <header>
            <h4 id="next-actions-modal-title" data-localise="diagnostic.make a choice"></h4>
        </header>
        <div data-bind="latex: feedback"></div>

        <menu data-bind="foreach: actions" class="list-unstyled actions">
            <li>
                <button type="button" data-bind="click: go"><span data-bind="latex: label"></span></button>
            </li>
        </menu>
    </form>
</dialog>

<dialog id="lightbox"></dialog>
        <div id="everything">
            <a class="sr-only" id="skip-link" data-bind="attr: {href: infoPage() ? '#infoDisplay' : '#questionContainer'}" data-localise="page.skip to content"></a>
            <!-- ko if: exam.settings.navigateMode=='sequence' -->
    <!-- side menu, slides out on narrow screens -->
<nav id="sideNav">

    <header>
        <img class="logo center-block" src="resources/numbas-logo.svg" alt="Numbas"/>

        <h1 class="exam-name" data-bind="text: exam.settings.name, typeset: exam.settings.name"></h1>

        <button type="button" class="navbar-toggle btn" aria-controls="navMenu">
            <svg viewBox="0 0 9 9">
    <title data-localise="control.toggle navigation menu"></title>
    <line x1="1" y1="1" x2="8" y2="8" stroke="currentColor"/>
    <line x1="1" y1="8" x2="8" y2="1" stroke="currentColor"/>
</svg>
        </button>
    </header>

    <!-- ko if: numQuestions() > 1 -->
    <label class="sr-only" for="exam-progress" data-localise="exam.progress"></label>
    <progress id="exam-progress" data-bind="attr: {max: numQuestions(), value: questionsAttempted(), title: questionsAttemptedDisplay}, text: questionsAttemptedDisplay"></progress>
    <!-- /ko -->

    <menu id="questionList" class="nav navmenu-nav" role="tablist" aria-orientation="vertical" data-bind="tablist: true">
        <li class="introduction" data-bind="visible: exam.hasIntro, css: {active: $root.exam().infoPage()=='introduction'}">
            <a href="#" role="tab" data-bind="click: () => showInfoPage('introduction'), attr: {'aria-current': $root.exam().infoPage()=='introduction' ? 'step' : false, tabindex: $root.exam().infoPage()=='introduction' ? 0 : -1, 'data-name': R('control.show introduction')}" data-localise="control.show introduction"></a>
       </li>
        <!-- ko foreach: question_groups -->
            <!-- ko if: $root.exam().showQuestionGroupNames -->
            <li class="question-group-header" data-bind="visible: show_name">
                <h2 data-bind="text: name, typeset: name"></h2>
                <span class="score" data-bind="html: feedback.message"></span>
            </li>
            <!-- /ko -->
            <!-- ko foreach: questions -->
            <li class="questionSelector" data-bind="visible: visible, css: {active: $root.exam().currentQuestion()==$data}">
                <a href="#" role="tab" data-bind="click: Numbas.controls.makeQuestionJumper(question.number, question.exam), attr: {'aria-current': isCurrentQuestion() ? 'step' : false, tabindex: isCurrentQuestion() ? 0 : -1, 'data-number': question.number+1, 'data-name': displayName}">
                    <div class="question-info">
                        <span class="feedback-icon" data-bind="css: scoreFeedback.iconClass, attr: scoreFeedback.iconAttr" aria-hidden="true"></span>
                        <span class="name" data-bind="text: displayName"></span>
                        <span class="sr-only" data-bind="text: scoreFeedback.iconAttr().title"></span>
                        <span class="score" data-bind="html: scoreFeedback.message"></span>
                    </div>
                    <div class="messages">
                        <div class="answered-state" data-bind="">
                            <span data-bind="text: scoreFeedback.answeredString"></span>
                        </div>
                        <div data-bind="visible: isDirty" class="dirty-message">
                            <span class="warning-icon icon-exclamation-sign"></span>
                            <span data-localise="question.selector.unsubmitted changes"></span>
                        </div>
                    </div>
                </a>
            </li>
            <!-- /ko -->
        <!-- /ko -->
        <!-- total exam score display -->
        <li class="examScore" data-bind="visible: showActualMark">
            <span data-localise="control.total"></span> 
            <span id="examScore" data-bind="html: examScoreDisplay"></span>
        </li>
    </menu>

    <div class="stopWatch" data-bind="visible: showTime">
    <span class="" data-localise="timing.time remaining"></span>
    <time class="time" data-bind="duration: timeRemaining"></time>
</div>

    <menu class="nav navmenu-nav menuButtons">
        <li><button class="btn center-block thin-button display-options force-original-color" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button></li>
        <li data-bind="visible: allowPause && mode()=='normal'"><button class="btn center-block thin-button" id="pauseBtn" data-localise="control.pause" data-bind="click: pause"></button></li>
        <li data-bind="visible: mode()=='normal'"><button class="btn danger center-block" id="endBtn" data-localise="control.end exam" data-bind="click: endExam"></button></li>
        <li data-bind="visible: mode()=='review'"><button class="btn center-block" data-localise="control.back to results" data-bind="click: () => showInfoPage('result')"></button></li>
    </menu>

</nav>

<!-- top menu shown on narrow screens -->
<nav id="topNav" class="navbar">
    <!-- ko if: numQuestions() > 1 -->
    <div class="prev"><button type="button" class="btn" data-bind="click: reverse, attr: {disabled: !canReverse()}"><span class="sr-only" data-localise="control.previous"></span>&larr;</button></div>
    <div class="next"><button type="button" class="btn" data-bind="click: advance, attr: {disabled: !canAdvance()}"><span class="sr-only" data-localise="control.next"></span>&rarr;</span></button></div>
    <!-- /ko -->
    <div class="end"><button class="btn danger" data-localise="control.end exam" data-bind="click: endExam, visible: mode()=='normal' && !canAdvance()"></button></div>
    <div class="titleBits" data-bind="with: currentQuestion">
        <span class="review-header" data-bind="visible: $root.exam().mode()=='review'" data-localise="exam.review header"></span>
        <span id="questionNameDisplay" data-bind="text: displayName"></span>
    </div>

    <div class="stopWatch" data-bind="visible: showTime">
    <span class="" data-localise="timing.time remaining"></span>
    <time class="time" data-bind="duration: timeRemaining"></time>
</div>

    <button type="button" class="navbar-toggle btn" aria-controls="navMenu">
        <svg viewBox="0 0 9 9">
    <title data-localise="control.toggle navigation menu"></title>
    <rect x="0" y="0" width="9" height="1" fill="currentColor"/>
    <rect x="0" y="4" width="9" height="1" fill="currentColor"/>
    <rect x="0" y="8" width="9" height="1" fill="currentColor"/>
</svg>
    </button>
</nav>
<!-- /ko -->

<!-- ko if: exam.settings.navigateMode=='menu' -->
    <nav id="topNav" class="navbar">
    <button type="button" class="btn primary" data-bind="visible: mode()=='normal', click: showMenu">&larr; <span data-localise="control.back to menu"></span></button>
    <button type="button" class="btn primary" data-bind="visible: mode()=='review', click: () => showInfoPage('result')">&larr; <span data-localise="control.back to results"></span></button>
    <div class="titleBits" data-bind="with: currentQuestion">
        <span class="review-header" data-bind="visible: $root.exam().mode()=='review'" data-localise="exam.review header"></span>
        <span id="questionNameDisplay" data-bind="latex: displayName"></span>
    </div>
    <button class="btn thin-button display-options force-original-color" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button>
</nav>
<!-- /ko -->

<!-- ko if: exam.settings.navigateMode=='diagnostic' -->
    <!-- side menu, slides out on narrow screens -->
<nav id="sideNav">

    <header>
        <div class="navmenu-brand">
            <img class="logo center-block" src="resources/numbas-logo.svg" alt="Numbas"/>
        </div>
        <h1 class="exam-name navmenu-brand" data-bind="text: exam.settings.name, typeset: exam.settings.name"></h1>
        <button type="button" class="navbar-toggle btn" aria-controls="navMenu">
            <svg viewBox="0 0 9 9">
    <title data-localise="control.toggle navigation menu"></title>
    <line x1="1" y1="1" x2="8" y2="8" stroke="currentColor"/>
    <line x1="1" y1="8" x2="8" y2="1" stroke="currentColor"/>
</svg>
        </button>
    </header>

    <dl id="learning-objective-list" class="nav navemnu-nav">
        <!-- ko foreach: diagnostic_progress -->
        <dt class="name" data-bind="latex: name"></dt>
        <dd data-bind="text: Math.floor(100*progress)+'%'"></dd>
        <!-- /ko -->
    </dl>


    <div class="stopWatch" data-bind="visible: showTime">
    <span class="" data-localise="timing.time remaining"></span>
    <time class="time" data-bind="duration: timeRemaining"></time>
</div>

    <menu class="nav navmenu-nav menuButtons">
        <li><button class="btn center-block thin-button display-options force-original-color" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button></li>
        <li data-bind="visible: allowPause && mode()=='normal'"><button class="btn center-block thin-button" id="pauseBtn" data-localise="control.pause" data-bind="click: pause"></button></li>
        <li data-bind="visible: mode()=='normal'"><button class="btn danger center-block" id="endBtn" data-localise="control.end exam" data-bind="click: endExam"></button></li>
        <li data-bind="visible: mode()=='review'"><button class="btn center-block" data-localise="control.back to results" data-bind="click: () => showInfoPage('result')"></button></li>
    </menu>

</nav>

<!-- top menu shown on narrow screens -->
<nav id="topNav" class="navbar">
    <div class="nav">
        <div class="titleBits" data-bind="with: currentQuestion">
            <span class="review-header" data-bind="visible: $root.exam().mode()=='review'" data-localise="exam.review header"></span>
            <span id="questionNameDisplay" data-bind="text: displayName"></span>
        </div>

        <div class="stopWatch" data-bind="visible: showTime">
    <span class="" data-localise="timing.time remaining"></span>
    <time class="time" data-bind="duration: timeRemaining"></time>
</div>
    </div>

    <button type="button" class="navbar-toggle btn" aria-controls="navMenu">
        <svg viewBox="0 0 9 9">
    <title data-localise="control.toggle navigation menu"></title>
    <rect x="0" y="0" width="9" height="1" fill="currentColor"/>
    <rect x="0" y="4" width="9" height="1" fill="currentColor"/>
    <rect x="0" y="8" width="9" height="1" fill="currentColor"/>
</svg>
    </button>
</nav>
<!-- /ko -->

            <!-- main content area - info pages or questions go in here -->
            <main class="mainDisplay" role="main" data-bind="attr: {'aria-labelledby': main_labelledby}">
                <div id="infoDisplay" class="main-content" data-bind="visible: infoPage">
    <div id="frontpage" data-bind="visible: infoPage()=='frontpage', if: infoPage()=='frontpage'">
        <h1 class="break-words" id="infopage-frontpage-header" data-bind="html: exam.settings.name"></h1>
<table class="summary">
    <tbody>
    <!-- ko if: exam.settings.navigateMode != 'diagnostic' -->
    <tr>
        <th data-localise="exam.number of questions"></th>
        <td class="rtd" data-bind="html: numAssessedQuestions"></td>
    </tr>
    <tr data-bind="visible: exam.settings.showTotalMark">
        <th data-localise="exam.marks available"></th>
        <td class="rtd" data-bind="niceNumber: marks"></td>
    </tr>
    <!-- /ko -->
    <tr data-bind="visible: exam.settings.percentPass>0">
        <th data-localise="exam.pass percentage"></th>
        <td class="rtd" data-bind="text: percentPass"></td>
    </tr>
    <tr data-bind="visible: duration()>0">
        <th data-localise="exam.time allowed"></th>
        <td class="rtd"><time data-bind="duration: duration"></time></td>
    </tr>
    <tr data-bind="visible: exam.settings.showStudentName && exam.student_name && !needsStudentName">
        <th data-localise="exam.student name"></th>
        <td><span data-bind="text: exam.student_name"></span><span data-bind="visible: exam.student_id"> (<span data-bind="text: exam.student_id"></span>)</span></td>
    </tr>
    </tbody>
</table>

<div id="intro" data-bind="visible: exam.hasIntro, latex: exam.introMessage" localise-data-jme-context-description="exam.introduction"></div>

<div class="alert danger" data-bind="visible: showAttemptDownloadSecurityWarning">
    <p data-localise="exam.attempt download security warning"></p>
</div>
<div id="standalone-warning" class="alert info" data-bind="visible: !Numbas.storage.lmsConnected && !allowAttemptDownload" data-localise="frontpage.scorm.lms not connected"></div>

<form data-bind="submit: beginExam" class="info-buttons">
    <button class="btn display-options force-original-color" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button>
    <div class="student-name" data-bind="visible: needsStudentName">
        <label for="begin-exam-student-name" data-localise="exam.enter your name"></label>
        <input id="begin-exam-student-name" name="begin-exam-student-name" type="text" data-bind="textInput: student_name, autosize: student_name"/>
    </div>
    <div class="password" data-bind="visible: needsPassword">
        <label for="begin-exam-password" data-localise="exam.enter password"></label>
        <input id="begin-exam-password" autocomplete="off" name="begin-exam-password" type="text" data-bind="textInput: passwordHandler.value, autosize: passwordHandler.value, css: {'has-errors': passwordHandler.value().length && !passwordHandler.valid(), 'success': passwordHandler.valid()}"/>
        <span class="password-feedback feedback-icon" data-bind="css: passwordHandler.feedback().iconClass, attr: {title: passwordHandler.feedback().title}"></span>
    </div>
    <button class="btn" id="startBtn" type="submit" data-bind="disable: !canBegin(), css: passwordHandler.feedback().buttonClass" data-localise="frontpage.start"></button>
</form>
    </div>
    <div id="menu" data-bind="visible: infoPage()=='menu', if: infoPage()=='menu'">
        <h1 id="infopage-menu-header" class="break-words" data-bind="html: exam.settings.name"></h1>

<div class="intro" class="alert" data-bind="visible: exam.hasIntro, latex: exam.introMessage" localise-data-jme-context-description="exam.introduction"></div>

<nav id="question-chooser">
    <table class="table questionSelector">
        <colgroup>
            <col class="question">
            <col class="score">
            <col class="icon">
        </colgroup>
        <tbody>
        <!-- ko foreach: question_groups -->
            <!-- ko if: $parent.showQuestionGroupNames -->
            <tr>
                <th data-bind="visible: $parent.question_groups.length>1">
                    <span data-bind="latex: name"></span>
                </th>
                <th class="messages">
                    <span class="score" data-bind="html: feedback.plainMessage"></span>
                </th>
                <th class="icon">
                    <span class="feedback-icon" data-bind="css: feedback.iconClass, attr: feedback.iconAttr" aria-hidden="true"></span>
                </th>
            </tr>
            <!-- /ko -->
            <!-- ko foreach: questions -->
            <tr class="" role="button" data-bind="click: Numbas.controls.makeQuestionJumper(question.number, question.exam), attr: {'aria-labelledby': question.path+'-menu-name'}">
                <td class="info">
                    <button class="btn link" type="button" class="name" data-bind="latex: displayName, attr: {id: question.path+'-menu-name'}"></button>
                </td>
                <td class="messages">
                    <span class="sr-only" data-bind="text: scoreFeedback.iconAttr().title"></span>
                    <span class="score" data-bind="html: scoreFeedback.plainMessage"></span>
                    <div class="answered-state" data-bind="">
                        <span data-bind="text: scoreFeedback.attemptedString"></span>
                    </div>
                    <div data-bind="visible: isDirty" class="dirty-message">
                        <span class="warning-icon icon-exclamation-sign"></span>
                        <span data-localise="question.selector.unsubmitted changes"></span>
                    </div>
                </td>
                <td class="icon">
                    <span class="feedback-icon" data-bind="css: scoreFeedback.iconClass, attr: scoreFeedback.iconAttr" aria-hidden="true"></span>
                </td>
            </tr>
            <!-- /ko -->
        <!-- /ko -->
        </tbody>
    </table>
</nav>

<menu class="nav navmenu-nav menuButtons">
    <li><button class="btn thin-button" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button></li>
    <li><button class="btn danger thin-button" id="endBtn" data-localise="control.end exam" data-bind="click: endExam"></button></li>
</menu>
    </div>
    <div id="introduction" data-bind="visible: infoPage()=='introduction', if: infoPage()=='introduction'">
        <h1 id="infopage-introduction-header" data-localise="exam.introduction"></h1>
<div data-bind="latex: exam.introMessage" localise-data-jme-context-description="exam.introduction"></div>
    </div>
    <div id="suspend" data-bind="visible: infoPage()=='paused' || infoPage()=='resumed', if: infoPage()=='paused' || infoPage()=='resumed'">
        <h1 id="infopage-suspend-header">
    <span data-bind="visible: infoPage()=='paused'" data-localise="suspend.paused header" ></span>
    <span data-bind="visible: infoPage()=='resumed'" data-localise="suspend.resumed header" ></span>
</h1>
<p data-localise="suspend.exam suspended"></p>
<p data-localise="suspend.you can resume"></p>
<button class="btn primary" id="resumeBtn" data-bind="click: resumeExam" data-localise="suspend.resume"></button>
    </div>
    <div id="results" data-bind="visible: infoPage()=='result', if: infoPage()=='result'">
        <header>
    <h1 class="exam-name text-center break-words" data-bind="latex: exam.settings.name"></h1>
</header>

<!-- ko if: exam.settings.navigateMode=='diagnostic' -->
    <table id="diagnostic-breakdown">
    <colgroup>
        <col>
        <col>
    </colgroup>
    <thead>
        <th data-localise="result.learning objective"></th>
        <!-- ko if: showActualMark -->
        <th data-localise="result.question score"></th>
        <!-- /ko -->
    </thead>
    <tbody>
        <!-- ko foreach: diagnostic_progress -->
            <tr data-bind="css: {total: $index()==$parent.diagnostic_progress().length-1}">
                <td class="name" data-bind="latex: name"></td>
                <!-- ko if: $parent.showActualMark -->
                <td class="score" data-bind="text: Math.floor(100*credit)+'%'"></td>
                <!-- /ko -->
            </tr>
        <!-- /ko -->
    </tbody>
</table>
<!-- /ko -->

<!-- ko if: exam.settings.navigateMode=='sequence' || exam.settings.navigateMode=='menu' -->
<p data-localise="result.click a question to review"></p>
<table id="question-breakdown">
    <colgroup>
        <col>
        <col span="3" class="score">
        <col>
    </colgroup>
    <thead>
        <tr>
        <!-- ko if: exam.settings.navigateMode=='sequence' -->
            <th data-localise="result.question number"></th>
        <!-- /ko -->
        <!-- ko if: exam.settings.navigateMode=='menu' -->
            <th data-localise="question"></th>
        <!-- /ko -->
        <th data-bind="text: resultsScoreColumnHeader"></th>
        </tr>
    </thead>
    <tbody>
        <!-- ko foreach: question_groups -->
            <!-- ko if: $root.exam().showQuestionGroupNames -->
            <tr class="question-group-header" data-bind="visible: show_name">
                <th data-bind="text: name, typeset: name"></th>
                <th class="score-cell" data-bind="html: feedback.plainMessage"></th>
            </tr>
            <!-- /ko -->
            <!-- ko foreach: questions -->
            <tr class="question" data-bind="click: review, attr: {title: R('result.question review title')}">
                <td class="name"><a href="#" data-bind="latex: displayName"></a></td>
                <td class="score-cell" data-bind="html: scoreFeedback.plainMessage"></td>
            </tr>
            <!-- /ko -->
        <!-- /ko -->
        <!-- ko if: scoreFeedback.showActualMark() || scoreFeedback.showTotalMark() -->
        <tr class="total">
            <th scope="row" data-localise="Total"></th>
            <td class="score-cell">
                <span class="score" data-bind="html: scoreFeedback.plainMessage"></span>
                <!-- ko if: scoreFeedback.showActualMark() && scoreFeedback.showTotalMark() -->(<span data-bind="text: percentScore"></span>%)<!-- /ko -->
            </td>
        </tr>
        <!-- /ko -->
    </tbody>
</table>

<!-- /ko -->

<div id="end-message" class="alert" data-bind="visible: exam.has_end_message, latex: exam.end_message" localise-data-jme-context-description="exam.end_message"></div>

<!-- ko if: scoreFeedback.showActualMark -->
<div id="feedback" class="alert results-feedback" data-bind="visible: feedbackMessage()!==null, latex: feedbackMessage" localise-data-jme-context-description="exam.feedback"></div>
<!-- /ko -->

<div id="performance-summary">
    <h2 data-localise="result.performance summary"></h2>

    <table class="summary">
        <tr>
            <th data-localise="exam.exam name"></th>
            <td class="break-words" data-bind="html: exam.settings.name"></td>
        </tr>
        <tr>
            <th data-localise="exam.random seed"></th>
            <td class="break-words" data-bind="html: exam.seed"></td>
        </tr>
        <tr data-bind="visible: exam.settings.showStudentName && exam.student_name">
            <th data-localise="exam.student name"></th>
            <td class="break-words"><span data-bind="text: exam.student_name"></span><span data-bind="visible: exam.student_id"> (<span data-bind="text: exam.student_id"></span>)</span></td>
        </tr>
        <tr>
            <th data-localise="result.exam start"></th>
            <td class="break-words"><time data-bind="datetime: startTime"></time></td>
        </tr>
        <tr>
            <th data-localise="result.exam stop"></th>
            <td class="break-words"><time data-bind="datetime: endTime"></time></td>
        </tr>
        <tr>
            <th data-localise="result.time spent"></th>
            <td class="break-words"><time data-bind="duration: timeSpent"></time></td>
        </tr>
    </table>
</div>



<div class="info-buttons">
    <button class="btn info" data-bind="visible: allowPrinting, click: function(){ window.print(); }, text: printLabel"></button>
    <button class="btn info" data-bind="visible: allowAttemptDownload, click: download_attempt_data" data-localise="result.download exam object"></button>
</div>

<p id="finished-text" class="text-center" data-localise="end.exam has finished"></p>
    </div>

    
    <footer class="copyright-footer">
    Created using <a target="_blank" href="https://www.numbas.org.uk">Numbas</a> v9.1, developed by <a target="_blank" href="https://www.newcastle.ac.uk">Newcastle University</a>.
</footer>
    
</div>

                <div id="questionContainer" class="print-visible" data-bind="visible: currentQuestion, css: {review: mode()=='review'}">
    <div class="contentArea ">
        <div id="diagnostic-feedback" class="diagnostic-feedback" data-bind="visible: diagnostic_feedback, latex: diagnostic_feedback"></div>

        <div id="questionDisplay" data-bind="foreach: questions">
            <div class="question-wrapper print-visible" data-bind="promise: html_promise, visible: isCurrentQuestion">
            </div>
        </div>

        <footer class="copyright-footer">
    Created using <a target="_blank" href="https://www.numbas.org.uk">Numbas</a> v9.1, developed by <a target="_blank" href="https://www.newcastle.ac.uk">Newcastle University</a>.
</footer>
    </div>

</div>
            </main>
        </div>
    </exam-container>
</template>
        <div id="no-stylesheet">
            <p data-localise="page.no stylesheet loaded"></p>
        </div>

        <div id="with-stylesheet">
<div id="die" hidden class="force-default-style">
    <h1 data-localise="die.numbas failed">Numbas failed</h1>
    <p data-localise="die.sorry"></p>
    <div class="error" tabindex="1">
        <div class="message"></div>
        <div class="stack"></div>
    </div>
</div>
<div id="loading">
    <img class="logo center-block" src="resources/numbas-logo.svg" alt="Numbas"/>
    <progress min="0" max="100" value="0"></progress>
    <span class="loading-text" data-localise="page.loading">Loading...</span>
</div>

            
            <numbas-exam storage="scorm">
                <script type="application/numbas-exam">// Numbas version: finer_feedback_settings
{"name": "STD 30MINS WM104 in class assessment part (ii) : matrices", "metadata": {"description": "<p>Matrix addition, multiplication. Finding inverse. Determinants. Systems of equations.</p>", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 1800, "percentPass": 0, "showQuestionGroupNames": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "Add/Subtract 2 x 2 matrices", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"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/"}], "tags": [], "metadata": {"description": "<p>Linear combinations of $2 \\times 2$ matrices. Three examples.</p>", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "<p>Let&nbsp;<br/>\\[A=\\simplify{{a}},\\;\\; B=\\simplify{{b}}\\;\\]<br/>Calculate the following $2 \\times 2$ matrices:</p>\n<p>&nbsp;</p>", "advice": "<h4>a)</h4>\n<p>\\[ \\begin{eqnarray*} \\simplify[std]{A+B} &amp;=&amp;\\simplify[std]{{a}+{b}}\\\\ &amp;=&amp; \\begin{pmatrix} \\simplify[std]{{a[0][0]}+{b[0][0]}}&amp;&nbsp;\\simplify[std]{{a[0][1]}+{b[0][1]}}\\\\&nbsp;&nbsp;\\simplify[std]{{a[1][0]}+{b[1][0]}}&amp;\\simplify[std]{{a[1][1]}+{b[1][1]}} \\end{pmatrix}\\\\ &amp;=&amp;\\simplify{{apb}}\\\\ &nbsp;\\end{eqnarray*} \\]</p>\n<h4>b)&nbsp;</h4>\n<p>\\[ \\begin{eqnarray*} \\simplify[std]{{p}A+{q}B} &amp;=&amp;\\simplify[std]{{p}{a}+{q}{b}}\\\\ &amp;=&amp; \\begin{pmatrix} \\simplify[std]{{p}*{a[0][0]}+{q}*{b[0][0]}}&amp;&nbsp;\\simplify[std]{{p}*{a[0][1]}+{q}*{b[0][1]}}\\\\&nbsp;&nbsp;\\simplify[std]{{p}*{a[1][0]}+{q}*{b[1][0]}}&amp;\\simplify[std]{{p}*{a[1][1]}+{q}*{b[1][1]}} \\end{pmatrix}\\\\ &amp;=&amp;\\simplify{{lcab}}\\\\ &nbsp;\\end{eqnarray*} \\]</p>\n<h4>c)</h4>\n<p>\\[ \\begin{eqnarray*} \\simplify[std]{{p1}A+{q1}B+{r1}C} &amp;=&amp;\\simplify[std]{{p1}{a}+{q1}{b}+{r1}{c}}\\\\ &amp;=&amp; \\begin{pmatrix} \\simplify[std]{{p1}*{a[0][0]}+{q1}*{b[0][0]}+{r1}*{c[0][0]}}&amp;&nbsp;\\simplify[std]{{p1}*{a[0][1]}+{q1}*{b[0][1]}+{r1}*{c[0][1]}}\\\\&nbsp;&nbsp;\\simplify[std]{{p1}*{a[1][0]}+{q1}*{b[1][0]}+{r1}*{c[1][0]}}&amp;\\simplify[std]{{p1}*{a[1][1]}+{q1}*{b[1][1]}+{r1}*{c[1][1]}} \\end{pmatrix}\\\\ &amp;=&amp;\\simplify{{lcabc}}\\\\ &nbsp;\\end{eqnarray*} \\]</p>\n<p>&nbsp;</p>", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noleadingminus"]}, "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-5..5 except 0),2),2))", "description": "", "templateType": "anything"}, "q1": {"name": "q1", "group": "Ungrouped variables", "definition": "random(-6..6 except [0,1,-1,p1,q])", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0],b[0][0]]),2),2))", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-5..5 except [0,a[0][0]]),2),2))", "description": "", "templateType": "anything"}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "random(-6..6 except [0,1,-1,p1,q1])", "description": "", "templateType": "anything"}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(-6..6 except [0,1,-1,p])", "description": "", "templateType": "anything"}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "random(2..6 except p)", "description": "", "templateType": "anything"}, "apb": {"name": "apb", "group": "Ungrouped variables", "definition": "a+b", "description": "", "templateType": "anything"}, "lcab": {"name": "lcab", "group": "Ungrouped variables", "definition": "p*a+q*b", "description": "", "templateType": "anything"}, "lcabc": {"name": "lcabc", "group": "Ungrouped variables", "definition": "p1*a+q1*b+r1*c", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "q1", "c", "b", "r1", "q", "p", "p1", "apb", "lcab", "lcabc"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>$\\mathrm{A}+\\mathrm{B} = \\simplify[std]{{a}+{b}} = $ [[0]]</p>", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "apb", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "$\\simplify{{p}A+{q}B = {p}{a}+{q}{b}}=$ [[0]]", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "lcab", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false}], "sortAnswers": false}], "type": "question"}, {"name": "Matrix Multiplication", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"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/"}], "tags": [], "metadata": {"description": "<p>Multiplication of $2 \\times 2$ matrices.</p>", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "\n  \n  \n  <p>Do the following matrix problems <br/>Let <br/>\\[A=\\begin{pmatrix} \\var{a11}&#38;\\var{a12}\\\\ \\var{a21}&#38;\\var{a22}\\\\ \\end{pmatrix},\\;\\;\n  \n  B=\\begin{pmatrix} \\var{b11}&#38;\\var{b12}\\\\ \\var{b21}&#38;\\var{b22}\\\\ \\end{pmatrix},\\;\\;\n  \n  C=\\begin{pmatrix} \\var{c11}&#38;\\var{c12}\\\\ \\var{c21}&#38;\\var{c22}\\\\ \\end{pmatrix}\\]<br/>Calculate the following products of these matrices:</p>\n  \n  \n    \n    ", "advice": "<h4>a)</h4>\n<p>\\[ \\begin{eqnarray*} AB &amp;=&amp; \\begin{pmatrix} \\var{a11}&amp;\\var{a12}\\\\ \\var{a21}&amp;\\var{a22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{b11}&amp;\\var{b12}\\\\ \\var{b21}&amp;\\var{b22}\\\\ \\end{pmatrix}\\\\ &amp;=&amp; \\begin{pmatrix} \\simplify[]{{a11}{b11}+{a12}{b21}}&amp;\\simplify[]{{a11}{b12}+{a12}{b22}}\\\\ \\simplify[]{{a21}{b11}+{a22}{b21}}&amp;\\simplify[]{{a21}{b12}+{a22}{b22}}\\\\ \\end{pmatrix}\\\\ &amp;=&amp; \\begin{pmatrix} \\var{ab11}&amp;\\var{ab12}\\\\ \\var{ab21}&amp;\\var{ab22}\\\\ \\end{pmatrix} \\end{eqnarray*} \\]</p>\n<h4>b)</h4>\n<p>\\[ \\begin{eqnarray*} BA &amp;=&amp; \\begin{pmatrix} \\var{b11}&amp;\\var{b12}\\\\ \\var{b21}&amp;\\var{b22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{a11}&amp;\\var{a12}\\\\ \\var{a21}&amp;\\var{a22}\\\\ \\end{pmatrix}\\\\ &amp;=&amp; \\begin{pmatrix} \\simplify[]{{b11}{a11}+{b12}{a21}}&amp;\\simplify[]{{b11}{a12}+{b12}{a22}}\\\\ \\simplify[]{{b21}{a11}+{b22}{a21}}&amp;\\simplify[]{{b21}{a12}+{b22}{a22}}\\\\ \\end{pmatrix}\\\\ &amp;=&amp; \\begin{pmatrix} \\var{ba11}&amp;\\var{ba12}\\\\ \\var{ba21}&amp;\\var{ba22}\\\\ \\end{pmatrix} \\end{eqnarray*} \\]</p>\n<h4>c)</h4>\n<p>\\[ \\begin{eqnarray*} CB &amp;=&amp; \\begin{pmatrix} \\var{c11}&amp;\\var{c12}\\\\ \\var{c21}&amp;\\var{c22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{b11}&amp;\\var{b12}\\\\ \\var{b21}&amp;\\var{b22}\\\\ \\end{pmatrix}\\\\ &amp;=&amp; \\begin{pmatrix} \\simplify[]{{c11}{b11}+{c12}{b21}}&amp;\\simplify[]{{c11}{b12}+{c12}{b22}}\\\\ \\simplify[]{{c21}{b11}+{c22}{b21}}&amp;\\simplify[]{{c21}{b12}+{a22}{b22}}\\\\ \\end{pmatrix}\\\\ &amp;=&amp; \\begin{pmatrix} \\var{cb11}&amp;\\var{cb12}\\\\ \\var{cb21}&amp;\\var{cb22}\\\\ \\end{pmatrix} \\end{eqnarray*} \\]</p>\n<h4>d)</h4>\n<p>\\[ \\begin{eqnarray*} AC &amp;=&amp; \\begin{pmatrix} \\var{a11}&amp;\\var{a12}\\\\ \\var{a21}&amp;\\var{a22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{c11}&amp;\\var{c12}\\\\ \\var{c21}&amp;\\var{c22}\\\\ \\end{pmatrix}\\\\ &amp;=&amp; \\begin{pmatrix} \\simplify[]{{a11}{c11}+{a12}{c21}}&amp;\\simplify[]{{a11}{c12}+{a12}{c22}}\\\\ \\simplify[]{{a21}{c11}+{a22}{c21}}&amp;\\simplify[]{{a21}{c12}+{a22}{c22}}\\\\ \\end{pmatrix}\\\\ &amp;=&amp; \\begin{pmatrix} \\var{ac11}&amp;\\var{ac12}\\\\ \\var{ac21}&amp;\\var{ac22}\\\\ \\end{pmatrix} \\end{eqnarray*} \\]</p>", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "variables": {"ba21": {"name": "ba21", "group": "Ungrouped variables", "definition": "b21*a11+b22*a21", "description": "", "templateType": "anything"}, "a21": {"name": "a21", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}, "a22": {"name": "a22", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "ba22": {"name": "ba22", "group": "Ungrouped variables", "definition": "b21*a12+b22*a22", "description": "", "templateType": "anything"}, "cb21": {"name": "cb21", "group": "Ungrouped variables", "definition": "c21*b11+c22*b21", "description": "", "templateType": "anything"}, "b22": {"name": "b22", "group": "Ungrouped variables", "definition": "random(-3..-1)", "description": "", "templateType": "anything"}, "b21": {"name": "b21", "group": "Ungrouped variables", "definition": "random(2,3)", "description": "", "templateType": "anything"}, "cb22": {"name": "cb22", "group": "Ungrouped variables", "definition": "c21*b12+c22*b22", "description": "", "templateType": "anything"}, "ac22": {"name": "ac22", "group": "Ungrouped variables", "definition": "a21*c12+a22*c22", "description": "", "templateType": "anything"}, "ac21": {"name": "ac21", "group": "Ungrouped variables", "definition": "a21*c11+a22*c21", "description": "", "templateType": "anything"}, "ab22": {"name": "ab22", "group": "Ungrouped variables", "definition": "a21*b12+a22*b22", "description": "", "templateType": "anything"}, "ab21": {"name": "ab21", "group": "Ungrouped variables", "definition": "a21*b11+a22*b21", "description": "", "templateType": "anything"}, "b12": {"name": "b12", "group": "Ungrouped variables", "definition": "random(-3..1)", "description": "", "templateType": "anything"}, "b11": {"name": "b11", "group": "Ungrouped variables", "definition": "random(-3,-1,0,3)", "description": "", "templateType": "anything"}, "c12": {"name": "c12", "group": "Ungrouped variables", "definition": "a12+b12", "description": "", "templateType": "anything"}, "c11": {"name": "c11", "group": "Ungrouped variables", "definition": "random(1,0,4)", "description": "", "templateType": "anything"}, "ab12": {"name": "ab12", "group": "Ungrouped variables", "definition": "a11*b12+a12*b22", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(-2,1,2)", "description": "", "templateType": "anything"}, "cb11": {"name": "cb11", "group": "Ungrouped variables", "definition": "c11*b11+c12*b21", "description": "", "templateType": "anything"}, "cb12": {"name": "cb12", "group": "Ungrouped variables", "definition": "c11*b12+c12*b22", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "ab11": {"name": "ab11", "group": "Ungrouped variables", "definition": "a11*b11+a12*b21", "description": "", "templateType": "anything"}, "ba11": {"name": "ba11", "group": "Ungrouped variables", "definition": "b11*a11+b12*a21", "description": "", "templateType": "anything"}, "ba12": {"name": "ba12", "group": "Ungrouped variables", "definition": "b11*a12+b12*a22", "description": "", "templateType": "anything"}, "c22": {"name": "c22", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "c21": {"name": "c21", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "ac12": {"name": "ac12", "group": "Ungrouped variables", "definition": "a11*c12+a12*c22", "description": "", "templateType": "anything"}, "ac11": {"name": "ac11", "group": "Ungrouped variables", "definition": "a11*c11+a12*c21", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ba21", "a21", "a22", "ba22", "cb21", "b22", "b21", "cb22", "ac22", "ac21", "ab22", "ab21", "b12", "b11", "c12", "c11", "c22", "a11", "cb11", "cb12", "a12", "c21", "ba11", "ba12", "ab12", "ab11", "ac12", "ac11"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>$AB = \\begin{pmatrix} \\var{a11}&amp;\\var{a12}\\\\ \\var{a21}&amp;\\var{a22}\\\\ \\end{pmatrix}\\begin{pmatrix} \\var{b11}&amp;\\var{b12}\\\\ \\var{b21}&amp;\\var{b22}\\\\ \\end{pmatrix} = $ [[0]]</p>", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "matrix([\n    [ab11,ab12],\n    [ab21,ab22]\n])", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>$CB = \\begin{pmatrix} \\var{c11}&amp;\\var{c12}\\\\ \\var{c21}&amp;\\var{c22}\\\\ \\end{pmatrix} \\begin{pmatrix} \\var{b11}&amp;\\var{b12}\\\\ \\var{b21}&amp;\\var{b22}\\\\ \\end{pmatrix}=$&nbsp;[[0]]</p>", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "matrix([\n    [cb11,cb12],\n    [cb21,cb22]\n])", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": false}], "sortAnswers": false}], "type": "question"}, {"name": "Shaheen's copy of Shaheen's copy of Priyanka's copy of Find determinants and inverses of 2x2 matrices", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}, {"name": "Priyanka Pandya", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4134/"}], "tags": [], "metadata": {"description": "<p>Find the determinant and inverse of three $2 \\times 2$ invertible matrices.</p>", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "<p>Let</p>\n<p>\\begin{align} \\mathbf{A} &amp;= \\var{a}, &amp; \\mathbf{B} &amp;= \\var{b}, &amp; \\mathbf{C} &amp;= \\var{c} \\end{align}</p>", "advice": "<h4>Determinant of a $2 \\times 2$ matrix</h4>\n<p>The determinant of a matrix $\\mathrm{M} = \\begin{pmatrix} a&amp;b \\\\ c&amp;d \\end{pmatrix}$ is given by</p>\n<p>\\[ \\det\\left(\\mathrm{M}\\right) = ad-bc \\]</p>\n<p>If we have two $n \\times n$ matrices $M$ and $N$, then</p>\n<p>\\[ \\det\\left(\\mathrm{MN}\\right) = \\det\\left(\\mathrm{M}\\right)\\det\\left(\\mathrm{N}\\right) \\]</p>\n<p>And it follows that if we have a third matrix $P$,</p>\n<p>\\[ \\det\\left(\\mathrm{MNP}\\right) = \\det\\left(\\mathrm{M}\\right)\\det\\left(\\mathrm{N}\\right)\\det\\left(\\mathrm{P}\\right) \\]</p>\n<h4>a)</h4>\n<p>Thus for our example we have:</p>\n<p>\\begin{align}<br/>\\det\\left(\\mathrm{A}\\right) &amp;= \\simplify[]{{a11}*{a22}-{a12}*{a21} = {det(a)}} \\\\<br/>\\det\\left(\\mathrm{B}\\right) &amp;= \\simplify[]{{b11}*{b22}-{b12}*{b21} = {det(b)}} \\\\<br/>\\det\\left(\\mathrm{C}\\right) &amp;= \\simplify[]{{c11}*{c22}-{c12}*{c21} = {det(c)}}<br/>\\end{align}</p>\n<p>\\begin{align}<br/>\\det\\left( \\mathrm{ABC} \\right) &amp;= \\det(\\mathrm{A}) \\det(\\mathrm{B}) \\det(\\mathrm{C}) \\\\<br/>&amp;= \\simplify[]{{det(a)}*{det(b)}*{det(c)}} \\\\<br/>&amp;= \\var{det(a*b*c)}<br/>\\end{align}</p>\n<h4>Inverse of a $2 \\times 2$ matrix</h4>\n<p>Suppose $\\mathrm{M} = \\begin{pmatrix} a&amp;b \\\\ c&amp;d \\end{pmatrix}$ is a $2 \\times 2$ matrix and $\\det\\left(\\mathrm{M}\\right) = \\Delta \\neq 0$.</p>\n<p>Then $\\mathrm{M}$ is invertible and</p>\n<p>\\[ \\mathrm{M}^{-1} = \\frac{1}{\\Delta} \\begin{pmatrix} d &amp; -b\\\\ -c&amp; a \\end{pmatrix}=\\begin{pmatrix} \\frac{d}{\\Delta} &amp; -\\frac{b}{\\Delta}\\\\ -\\frac{c}{\\Delta}&amp; \\frac{a}{\\Delta} \\end{pmatrix}\\]</p>\n<p>Applying this to these examples we obtain:</p>\n<h4>b)</h4>\n<p>\\[ \\simplify[fractionnumbers]{matrix:A^(-1)={inverse(a)}} \\]</p>\n<h4>c)</h4>\n<p>\\[ \\simplify[fractionnumbers]{matrix:B^(-1)={inverse(b)}} \\]</p>\n<h4>d)</h4>\n<p>\\[ \\simplify[fractionnumbers]{matrix:C^(-1)={inverse(c)}} \\]</p>", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "variables": {"b22": {"name": "b22", "group": "Ungrouped variables", "definition": "if(tr3*b11=b21*b12,tr3+1,tr3)", "description": "", "templateType": "anything"}, "b21": {"name": "b21", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything"}, "tr2": {"name": "tr2", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Unnamed group", "definition": "matrix([ [b11,b12], [b21,b22] ])", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Unnamed group", "definition": "matrix([ [c11,c12], [c21,c22] ])", "description": "", "templateType": "anything"}, "a22": {"name": "a22", "group": "Ungrouped variables", "definition": "if(tr1*a11=a21*a12,tr1+1,tr1)", "description": "", "templateType": "anything"}, "c21": {"name": "c21", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "tr3": {"name": "tr3", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything"}, "c22": {"name": "c22", "group": "Ungrouped variables", "definition": "if(tr4*c11=c21*c12,tr4+1,tr4)", "description": "", "templateType": "anything"}, "c11": {"name": "c11", "group": "Ungrouped variables", "definition": "random(1,2,4)", "description": "", "templateType": "anything"}, "tr4": {"name": "tr4", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}, "b11": {"name": "b11", "group": "Ungrouped variables", "definition": "if(a11=tr2,tr2+1,tr2)", "description": "", "templateType": "anything"}, "tr1": {"name": "tr1", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Unnamed group", "definition": "matrix([ [a11,a12],[a21,a22] ])", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything"}, "b12": {"name": "b12", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything"}, "c12": {"name": "c12", "group": "Ungrouped variables", "definition": "a12+b12", "description": "", "templateType": "anything"}, "a21": {"name": "a21", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a11", "a12", "a21", "a22", "b11", "b12", "b21", "b22", "c11", "c12", "c21", "c22", "tr1", "tr2", "tr3", "tr4"], "variable_groups": [{"name": "Unnamed group", "variables": ["a", "b", "c"]}], "functions": {"inverse": {"parameters": [["m", "matrix"]], "type": "matrix", "language": "jme", "definition": "matrix([\n    [m[1][1], -m[0][1]],\n    [-m[1][0], m[0][0]]\n])/det(m)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>Calculate the determinants of these matrices.</p>\n<p>$\\mathrm{det}\\left(A\\right) = $&nbsp;[[0]]</p>\n<p>$\\mathrm{det}\\left(B\\right) = $&nbsp;[[1]]</p>\n<p>$\\mathrm{det}\\left(C\\right) = $&nbsp;[[2]]</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(a)", "maxValue": "det(a)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(b)", "maxValue": "det(b)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.5, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(c)", "maxValue": "det(c)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>Find the inverses of the following matrices. Input all matrix entries as fractions or integers and not as decimals.</p>\n<p>$\\mathbf{A}^{-1} = $&nbsp;[[0]]</p>", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "inverse(a)", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>$\\mathbf{B}^{-1} = $&nbsp;[[0]]</p>", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "inverse(b)", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true}], "sortAnswers": false}], "type": "question"}, {"name": "Shaheen's copy of Shaheen's copy of Andrew's copy of Matrices:  Inverse Matrix Method", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}], "tags": [], "metadata": {"description": "<p>Putting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix.&nbsp;</p>", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "<p>Write the following equations as a matrix equation <br/>\\[AX=b\\]for a matrix $A$ and column vectors $X$ and $b$<br/>\\[ \\begin{eqnarray*} \\simplify[std]{{a}x+{b}y}&amp;=&amp;\\var{c}\\\\ \\simplify[std]{{a1}x+{b1}y}&amp;=&amp;\\var{c1} \\end{eqnarray*} \\]</p>", "advice": "<h4>a)</h4>\n<p>The equations can be written in the matrix form:</p>\n<p>\\[\\begin{pmatrix} \\var{a} &amp; \\var{b}\\\\ \\var{a1}&amp;\\var{b1} \\end{pmatrix} \\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\begin{pmatrix} \\var{c} \\\\ \\var{c1} \\end{pmatrix}\\]</p>\n<h4>b)</h4>\n<p>Since $\\mathrm{det}(A) = \\simplify[]{{a}*{b1}-{b}*{a1}={dA}} \\neq 0$, $A$ is invertible and</p>\n<p>\\[A^{-1} = \\begin{pmatrix} \\simplify[std]{{b1}/{dA}}&amp;\\simplify[std]{{-b}/{dA}}\\\\\\simplify[std]{{-a1}/{dA}}&amp;\\simplify[std]{{a}/{dA}} \\end{pmatrix}\\]</p>\n<h4>c)</h4>\n<p>We have:</p>\n<p>\\[ \\begin{eqnarray*} A^{-1}b &amp;=&amp; \\begin{pmatrix} \\simplify[std]{{b1}/{dA}}&amp;\\simplify[std]{{-b}/{dA}}\\\\\\simplify[std]{{-a1}/{dA}}&amp;\\simplify[std]{{a}/{dA}} \\end{pmatrix}\\begin{pmatrix} \\var{c}\\\\\\var{c1}\\end{pmatrix} \\\\ &amp;=&amp; \\begin{pmatrix} \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\\\simplify[std]{{c1*a-c*a1}/{dA}}\\end{pmatrix} \\end{eqnarray*} \\]</p>\n<h4>d)</h4>\n<p>Note that $AX = b \\Rightarrow X = A^{-1}b$ hence we can read the solution from the last part as this gives:</p>\n<p>\\[\\begin{pmatrix} x\\\\y \\end{pmatrix} = \\begin{pmatrix} \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\ \\simplify[std]{{c1*a-c*a1}/{dA}}\\end{pmatrix}\\]</p>\n<p>Hence \\[\\begin{eqnarray*} x&amp;=&amp; \\simplify[std]{{c*b1-c1*b}/{dA}}\\\\ y&amp;=&amp; \\simplify[std]{{c1*a-c*a1}/{dA}} \\end{eqnarray*} \\]</p>", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "sc*random(1..9)", "description": "", "templateType": "anything"}, "sc1": {"name": "sc1", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "sa1": {"name": "sa1", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "sb1": {"name": "sb1", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "sb*random(1..9)", "description": "", "templateType": "anything"}, "sb": {"name": "sb", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "if(ab=1,sb1*random(2..9),if(ab=2 or ab=4 or ab=8,sb1*random(1,3,5,7,9), if(ab=3 or ab=6 or ab=9,sb1*random(1,2,4,5,6,8),if(ab=5,sb1*random(1,2,3,4,6,7,8,9),sb1*random(1,2,3,4,5,6,8,9)))))", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "sa*random(1..9)", "description": "", "templateType": "anything"}, "test": {"name": "test", "group": "Ungrouped variables", "definition": "round(a*b1/b)", "description": "", "templateType": "anything"}, "sa": {"name": "sa", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "ab": {"name": "ab", "group": "Ungrouped variables", "definition": "abs(b)", "description": "", "templateType": "anything"}, "inc": {"name": "inc", "group": "Ungrouped variables", "definition": "sa*random(1..9)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "if(test+inc=0,test+inc+1,test+inc)", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "sc1*random(1..9)", "description": "", "templateType": "anything"}, "addortakeaway": {"name": "addortakeaway", "group": "Ungrouped variables", "definition": "if(b*b1<0,'add the equation','take away the equation')", "description": "", "templateType": "anything"}, "da": {"name": "da", "group": "Ungrouped variables", "definition": "a*b1-a1*b", "description": "", "templateType": "anything"}, "sc": {"name": "sc", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "addortakeaway", "c", "b", "da", "a1", "sc", "ab", "sb1", "b1", "test", "sb", "sa", "sc1", "sa1", "c1", "inc"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p style=\"text-align: center;\">$A = $&nbsp;[[0]]</p>\n<table style=\"margin-left: auto; margin-right: auto;\">\n<tbody>\n<tr>\n<td rowspan=\"2\">$X = \\;\\;\\Bigg($</td>\n<td>[[1]]</td>\n<td rowspan=\"2\">$\\Bigg)$</td>\n</tr>\n<tr>\n<td>[[2]]</td>\n</tr>\n</tbody>\n</table>\n<p style=\"text-align: center;\">$b = $&nbsp;[[3]]</p>", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "matrix([\n    [a,b],\n    [a1,b1]\n])", "correctAnswerFractions": false, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "0.25", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "x", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "0.25", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "y", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": true, "valuegenerators": [{"name": "y", "value": ""}]}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": "0.5", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "matrix([\n    [c],\n    [c1]\n])", "correctAnswerFractions": true, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p><span>Find the inverse of $A$. </span></p>\n<ul>\n<li><span>Input all numbers as fractions or integers (not decimals). </span></li>\n<li><span>You do not need to simplify any fractions.</span></li>\n</ul>\n<p>$A^{-1} = $&nbsp;[[1]][[0]]</p>", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "matrix([\n    [b1,-b],\n    [-a1,a]\n])", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": true}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "1/{da}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>Calculate the following:</p>\n<ul>\n<li>Input your answers as integers or fractions (not decimals).</li>\n<li>You do not need to simplify fractions.</li>\n</ul>\n<p>$A^{-1}b = $&nbsp;[[0]]</p>", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "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}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>Now solve the equations, inputting your answers as fractions or integers (not decimals).</p>\n<p><br/>$x = \\;\\;$[[0]]</p>\n<p>$y = \\;\\;$[[1]]</p>", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "0.25", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "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, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "<p>Input as a fraction or an integer, not as a decimal</p>"}, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "0.25", "showCorrectAnswer": true, "showFeedbackIcon": false, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "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, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "<p>Input as a fraction or an integer, not as a decimal</p>"}, "valuegenerators": []}], "sortAnswers": false}], "type": "question"}, {"name": "Shaheen's copy of Cramers Rule 3x3", "extensions": [], "custom_part_types": [], "resources": ["question-resources/Cramers.PNG"], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}, {"name": "Marisa Llorens", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2155/"}], "tags": [], "metadata": {"description": "<p>Cramers Rule applied to 3 simultaneous equations</p>", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "<p><img width=\"876\" height=\"362\" src=\"resources/question-resources/Cramers.PNG\"/></p>\n<p>Using Cramer's rule (above), solve these simultaneous equations:</p>\n<p>$\\var{a11}x+\\var{a12}y+\\var{a13}z=\\var{c1}$</p>\n<p>$\\var{a21}x+\\var{a22}y+\\var{a23}z=\\var{c2}$</p>\n<p>$\\var{a31}x+\\var{a32}y+\\var{a33}z=\\var{c3}$</p>\n<p></p>", "advice": "<p>If \\[&nbsp; A=\\left( \\begin{array}{ccc}<br/>a_{11} &amp;&nbsp;a_{12} &amp; a_{13} \\\\a_{21} &amp;&nbsp;a_{22} &amp; a_{23}\\\\ a_{31} &amp;&nbsp;a_{32} &amp; a_{33}\\end{array} \\right),\\]</p>\n<p>\\[&nbsp; C=\\left( \\begin{array}{ccc}<br/>c_{1} \\\\&nbsp;c_{2}&nbsp;\\\\c_{3} \\end{array} \\right),\\]</p>\n<p>Cramer's Rule : ${x_1}=\\frac{\\Delta_1}{\\Delta_0}$ ,&nbsp; ${x_2}=\\frac{\\Delta_2}{\\Delta_0}$ , ${x_3}=\\frac{\\Delta_3}{\\Delta_0}$</p>\n<p>Where:\\[ \\Delta_0=\\left| \\begin{array}{ccc}<br/>a_{11} &amp;&nbsp;a_{12} &amp; a_{13} \\\\a_{21} &amp;&nbsp;a_{22} &amp; a_{23}\\\\ a_{31} &amp;&nbsp;a_{32} &amp; a_{33}\\end{array} \\right|\\]</p>\n<p>\\[ \\Delta_1=\\left| \\begin{array}{ccc}<br/>c_{1} &amp;&nbsp;a_{12} &amp; a_{13} \\\\c_{2} &amp;&nbsp;a_{22} &amp; a_{23}\\\\ c_{3} &amp;&nbsp;a_{32} &amp; a_{33}\\end{array} \\right|\\]</p>\n<p>\\[ \\Delta_2=\\left| \\begin{array}{ccc}<br/>a_{11} &amp;&nbsp;c_{1} &amp; a_{13} \\\\a_{21} &amp;&nbsp;c_{2} &amp; a_{23}\\\\ a_{31} &amp;&nbsp;c_{3} &amp; a_{33}\\end{array} \\right|\\]</p>\n<p>\\[ \\Delta_3=\\left| \\begin{array}{ccc}<br/>a_{11} &amp;&nbsp;a_{12} &amp; c_{1} \\\\a_{21} &amp;&nbsp;a_{22} &amp; c_{2}\\\\ a_{31} &amp;&nbsp;a_{32} &amp; c_{3}\\end{array} \\right|\\]</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>\n<p><span class=\"nb\"><span class=\"k\"><span class=\"s\">&nbsp;</span></span></span></p>\n<p></p>", "rulesets": {}, "variables": {"matrixA2": {"name": "matrixA2", "group": "Cramer determinants", "definition": "matrix([a11,c1,a13],[a21,c2,a23],[a31,c3,a33])", "description": "", "templateType": "anything"}, "a33": {"name": "a33", "group": "Ungrouped variables", "definition": "random(0..10)", "description": "", "templateType": "anything"}, "a22": {"name": "a22", "group": "Ungrouped variables", "definition": "random(0..10 except(a21*a12/a11))", "description": "", "templateType": "anything"}, "matrixA3": {"name": "matrixA3", "group": "Cramer determinants", "definition": "matrix([a11,a12,c1],[a21,a22,c2],[a31,a32,c3])", "description": "", "templateType": "anything"}, "matrixA1": {"name": "matrixA1", "group": "Cramer determinants", "definition": "matrix([c1,a12,a13],[c2,a22,a23],[c3,a32,a33])", "description": "", "templateType": "anything"}, "a31": {"name": "a31", "group": "Ungrouped variables", "definition": "random(0..10)", "description": "", "templateType": "anything"}, "a32": {"name": "a32", "group": "Ungrouped variables", "definition": "random(0..10)", "description": "", "templateType": "anything"}, "c3": {"name": "c3", "group": "Ungrouped variables", "definition": "a31*x1+a32*x2+a33*x3", "description": "", "templateType": "anything"}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything"}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "a21*x1+a22*x2+a23*x3", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(0..10)", "description": "", "templateType": "anything"}, "a23": {"name": "a23", "group": "Ungrouped variables", "definition": "random(0..10)", "description": "", "templateType": "anything"}, "matrixA": {"name": "matrixA", "group": "Ungrouped variables", "definition": "matrix([a11,a12,a13],[a21,a22,a23],[a31,a32,a33])", "description": "", "templateType": "anything"}, "a13": {"name": "a13", "group": "Ungrouped variables", "definition": "random(0..10)", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "random(0..10)", "description": "", "templateType": "anything"}, "x3": {"name": "x3", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything"}, "a21": {"name": "a21", "group": "Ungrouped variables", "definition": "random(0..10)", "description": "", "templateType": "anything"}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "random(-10..10 except 0)", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "a11*x1+a12*x2+a13*x3", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["matrixA", "a11", "a12", "a21", "a22", "a13", "a23", "a31", "a32", "a33", "x1", "x2", "x3", "c1", "c2", "c3"], "variable_groups": [{"name": "Cramer determinants", "variables": ["matrixA1", "matrixA2", "matrixA3"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>What is the determinant of $\\var{matrixA}$?</p>\n<p>[[0]]</p>\n<p></p>\n<p>NOTE : IF YOU GET A DETERMINANT OF ZERO FOR THIS ANSWER PLEASE ALERT THE INVIGILATOR.</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(matrixA)", "maxValue": "det(matrixA)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>Calculate&nbsp;$\\Delta_x=$ [[0]]</p>\n<p>Hence, calculate $x=$&nbsp; [[1]]</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(matrixA1)", "maxValue": "det(matrixA1)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{x1}", "maxValue": "{x1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p>Calculate&nbsp;$\\Delta_y=$[[0]]</p>\n<p>Hence, calculate ${y=}$&nbsp; [[1]]</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(matrixA2)", "maxValue": "det(matrixA2)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{x2}", "maxValue": "{x2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "<p style=\"text-align: left;\">Calculate&nbsp;$\\Delta_z=$[[0]]</p>\n<p>Hence, calculate $z=$&nbsp; [[1]]</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "det(matrixA3)", "maxValue": "det(matrixA3)", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{x3}", "maxValue": "{x3}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "type": "question"}]}], "navigation": {"allowregen": false, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "onleave": {"action": "warnifunattempted", "message": "<p>You have not answered this question!</p>"}, "preventleave": true, "startpassword": "MATii"}, "timing": {"allowPause": false, "timeout": {"action": "warn", "message": "<p>The matrices part of your in-class assessment is now finished .</p>"}, "timedwarning": {"action": "warn", "message": "<p>You have 5 minutes left to complete your matrices assessment.</p>"}}, "feedback": {"showactualmark": false, "showtotalmark": true, "showanswerstate": false, "allowrevealanswer": false, "advicethreshold": 0, "intro": "<p>This part of the in-class assessment</p>\n<ul>\n<li>assesses matrices: matrix arithmetic, determinants and inverses, solving simultaneous equations using matrix methods&nbsp;</li>\n<li>is worth 20% of your overall WM104 module mark.</li>\n</ul>\n<p>Answer all of the questions.</p>\n<p>If you need anything during the test please raise your hand to alert the invigilator.</p>\n<p>You may use rough paper for your calculations before inputting your answers.</p>\n<p>Remember to use the correct format (as stated in the question) for your answer.</p>", "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "oncompletion", "showactualmarkwhen": "oncompletion", "showtotalmarkwhen": "always", "showanswerstatewhen": "oncompletion", "showadvicewhen": "never"}, "type": "exam", "contributors": [{"name": "Marie Nicholson", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1799/"}, {"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}], "extensions": ["stats"], "custom_part_types": [], "resources": [["question-resources/Cramers.PNG", "/srv/numbas/media/question-resources/Cramers.PNG"]]}</script>
                <script type="application/json" slot="extension-data">{"stats": {"root": "extensions/stats", "stylesheets": [], "javascripts": ["stats.js"]}}</script>
            </numbas-exam>
            
        </div>
	</body>
</html>