// Numbas version: exam_results_page_options {"showQuestionGroupNames": false, "name": "Maria's copy of Linear algebra", "type": "question", "variable_groups": [], "question_groups": [{"pickingStrategy": "all-ordered", "name": "", "questions": [{"name": "Find eigenvalues and eigenvectors of matrices, and power of one matrix", "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/"}], "variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s1"}, "mxb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "max(a1,b1)", "description": "", "name": "mxb"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "a"}, "x1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s*(b22-mnB)", "description": "", "name": "x1"}, "a22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a+b-a11", "description": "", "name": "a22"}, "x2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s*(b22-mxB)", "description": "", "name": "x2"}, "cn22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mxB^n*x1-mnB^n*x2", "description": "", "name": "cn22"}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s2"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "a1"}, "cn11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mnB^n*x1-mxB^n*x2", "description": "", "name": "cn11"}, "da": {"templateType": "anything", "group": "Ungrouped variables", "definition": "{a11*a22-a12*a21}", "description": "", "name": "da"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "c2"}, "this": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mxA<0,mxA+random(1..6),mxA-random(1..6))", "description": "", "name": "this"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(4,5,6)", "description": "", "name": "n"}, "trb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "{b11+b22}", "description": "", "name": "trb"}, "b11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(test1=a1,that,test1=b1,that,test1)", "description": "", "name": "b11"}, "tra": {"templateType": "anything", "group": "Ungrouped variables", "definition": "{a11+a22}", "description": "", "name": "tra"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c1=a,a+random(1..3),c1)", "description": "", "name": "b"}, "cn12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "x1*x2*(mxB^n-mnB^n)", "description": "", "name": "cn12"}, "bn21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(s*cn21/f)", "description": "", "name": "bn21"}, "bn11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(s*cn11/f)", "description": "", "name": "bn11"}, "cn21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "mnB^n-mxB^n", "description": "", "name": "cn21"}, "b21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-s", "description": "", "name": "b21"}, "mxa": {"templateType": "anything", "group": "Ungrouped variables", "definition": "max(a,b)", "description": "", "name": "mxa"}, "b22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a1+b1-b11", "description": "", "name": "b22"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs(x1-x2)", "description": "", "name": "f"}, "that": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mxB<0,mxB+random(1..6),mxB-random(1..6))", "description": "", "name": "that"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c2=a1,a1+random(1..3),c2)", "description": "", "name": "b1"}, "b12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s*(a1*b1-b11*a1-b11*b1+b11^2)", "description": "", "name": "b12"}, "mnb": {"templateType": "anything", "group": "Ungrouped variables", "definition": "min(a1,b1)", "description": "", "name": "mnb"}, "test": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "test"}, "db": {"templateType": "anything", "group": "Ungrouped variables", "definition": "{b11*b22-b12*b21}", "description": "", "name": "db"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "c1"}, "bn12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(s*cn12/f)", "description": "", "name": "bn12"}, "test1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-8..8)", "description": "", "name": "test1"}, "mna": {"templateType": "anything", "group": "Ungrouped variables", "definition": "min(a,b)", "description": "", "name": "mna"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s"}, "a12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s", "description": "", "name": "a12"}, "a11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(test=a,this,test=b,this,test)", "description": "", "name": "a11"}, "a21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-s*(a*b-a11*a-a11*b+a11^2)", "description": "", "name": "a21"}, "bn22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(s*cn22/f)", "description": "", "name": "bn22"}}, "ungrouped_variables": ["test1", "a21", "a22", "bn22", "bn21", "b22", "b21", "b1", "cn11", "mna", "mnb", "cn12", "s2", "s1", "a12", "b12", "b11", "test", "cn21", "cn22", "a11", "that", "db", "bn12", "bn11", "da", "a1", "x2", "c2", "c1", "x1", "mxb", "mxa", "a", "b", "f", "tra", "trb", "n", "this", "s"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{mnA}", "minValue": "{mnA}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{mxA}", "minValue": "{mxA}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "
Find the eigenvalues of $A$.
\nLet $a_1$ be the least eigenvalue of $A,\\;\\;\\; a_1=\\;\\;$[[0]]
\nLet $a_2$ be the greatest eigenvalue of $A,\\;\\; a_2=\\;\\;$[[1]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{s*(mnA-a11)}", "minValue": "{s*(mnA-a11)}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{s*(mxA-a11)}", "minValue": "{s*(mxA-a11)}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "Find eigenvectors for $A$.
\nLet $(1,y_1)^T$ be an eigenvector corresponding to $a_1,\\;\\;\\;\\;y_1=\\;\\;$[[0]]
\nLet $(1,y_2)^T$ be an eigenvector corresponding to $a_2,\\;\\;\\;\\;y_2=\\;\\;$[[1]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{mnB}", "minValue": "{mnB}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{mxB}", "minValue": "{mxB}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n \n \nFind the eigenvalues of $B$.
\n \n \n \nLet $b_1$ be the least eigenvalue of $B,\\;\\;\\; b_1=\\;\\;$[[0]]
\n \n \n \nLet $b_2$ be the greatest eigenvalue of $B,\\;\\; b_2=\\;\\;$[[1]]
\n \n \n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{x1}", "minValue": "{x1}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{x2}", "minValue": "{x2}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "Find eigenvectors for $B$.
\nLet $(x_1,1)^T$ be an eigenvector corresponding to $b_1,\\;\\;\\;\\;x_1=\\;\\;$[[0]]
\nLet $(x_2,1)^T$ be an eigenvector corresponding to $b_2,\\;\\;\\;\\;x_2=\\;\\;$[[1]]
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{bn11}", "minValue": "{bn11}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{bn12}", "minValue": "{bn12}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{bn21}", "minValue": "{bn21}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{bn22}", "minValue": "{bn22}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\nFind $B^{\\var{n}}$ using the last two parts of this question:
\n$B^{\\var{n}} = \\Bigg($ | \n[[0]] | \n[[1]] | \n$\\Bigg)$ | \n
[[2]] | \n[[3]] | \n
Input your answers as integers.
\n ", "showCorrectAnswer": true, "marks": 0}], "statement": "\n \n \nFind the eigenvalues and eigenvectors for the matrices $A$ and $B$ where:
\\[ A=\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22} \\end{pmatrix},\\;\\;\\;\\;\\;\n \n B=\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22} \\end{pmatrix}\n \n \\]
10/07/2012:
\nAdded tags.
\nIn the Advice section it is not explained how to find the trace and the determinant of the matrix - Should this be included?
\nQuestion appears to be working correctly.
\n24/12/2012:
\nChecked calculations, OK. Added tested1 tag.
", "licence": "Creative Commons Attribution 4.0 International", "description": "$A,\\;B$ $2 \\times 2$ matrices. Find eigenvalues and eigenvectors of both. Hence or otherwise, find $B^n$ for largish $n$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "a)
\n\\[A - \\lambda I_2 = \\begin{pmatrix} \\var{a11}-\\lambda & \\var{a12}\\\\ \\var{a21} & \\var{a22}-\\lambda \\end{pmatrix}\\]
Hence the characteristic polynomial $p(\\lambda)$ is: \\[\\begin{eqnarray*} \\mathrm{det}\\left(A-\\lambda I_2 \\right)&=&\\simplify[zeroTerm]{({a11}-lambda)({a22}-lambda)-{a12}*{a21}}\\\\ &=& \\simplify[std]{lambda^2-{trA}*lambda+{dA}}\\\\ &=&\\simplify[std]{(lambda-{a})(lambda-{b})} \\end{eqnarray*} \\]
We see that on solving $p(\\lambda)=0$ we get the eigenvalues:
\\[\\lambda_1=\\var{mnA},\\;\\;\\;\\lambda_2=\\var{mxA}\\]
Note: We could have found the characteristic polynomial by noting that for a 2 × 2 matrix $A$ then the characteristic polynomial is
\\[\\lambda^2-\\mathrm{trace}(A)+\\mathrm{det}(A)\\]
where $\\mathrm{trace}(A) = \\var{trA},\\;\\;\\;\\mathrm{det}(A)=\\var{dA}$
b)
\n1. $\\lambda=\\var{mnA}$
\nWe have the eigenspace is given by all $v=(x,y)^T$ such that $(\\simplify{A-{mnA}}I_2)v=(0,0)^T$ i.e.
\n\\[\\begin{pmatrix} \\var{a11-mnA}&\\var{a12}\\\\ \\var{a21}&\\var{a22-mnA} \\end{pmatrix}\\begin{pmatrix} x \\\\ y \\end{pmatrix} =\\begin{pmatrix} 0 \\\\ 0 \\end{pmatrix}\\]
\nThis gives the two equations:
\n\\[ \\begin{eqnarray*} \\simplify[std]{{a11-mnA}x + {a12}y}&=&0\\\\ \\simplify[std]{{a21}x + {a22-mnA}y}&=&0 \\end{eqnarray*} \\]
There is only one equation here as we see that the equations are the same (one is a multiple of the other).
So putting $x=1$ in the first equation we get $y_1=\\var{-s*(a11-mnA)}$
\nHence the eigenvector we want is \\[\\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mnA)} \\end{pmatrix}\\]
\n2. $\\lambda=\\var{mxA}$
\nIn this case we have the equations:
\n\\[ \\begin{eqnarray*} \\simplify[std]{{a11-mxA}x + {a12}y}&=&0\\\\ \\simplify[std]{{a21}x + {a22-mxA}y}&=&0 \\end{eqnarray*} \\]
\nOnce again there is only one equation, so putting $x=1$ in the first equation we get $y_2=\\var{-s*(a11-mxA)}$
\nHence the eigenvector we want is \\[\\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mxA)} \\end{pmatrix}\\]
\nc)
\nThe characteristic polynomial is given by:
\n\\[p(\\lambda)=\\simplify[std]{lambda^2-{b11+b22}*lambda + {dB}}\\]
\nSolving $p(\\lambda)=0$, we find the eigenvalues for $B$ are:
\\[\\lambda_1=\\var{mnB},\\;\\;\\;\\lambda_2=\\var{mxB}\\]
d)
\n1. $\\lambda=\\var{mnB}$
\nThe equations are:
\\[ \\begin{eqnarray*} \\simplify[std]{{b11-mnB}x + {b12}y}&=&0\\\\ \\simplify[std]{{b21}x + {b22-mnB}y}&=&0 \\end{eqnarray*} \\]
Putting $y=1$ in the second equation we get $x_1=\\var{s*(b22-mnB)}$
\nHence the eigenvector we want is \\[\\begin{pmatrix} \\var{s*(b22-mnB)}\\\\1 \\end{pmatrix}\\]
\n2. $\\lambda=\\var{mxB}$
\nThe equations are:
\\[ \\begin{eqnarray*} \\simplify[std]{{b11-mxB}x + {b12}y}&=&0\\\\ \\simplify[std]{{b21}x + {b22-mxB}y}&=&0 \\end{eqnarray*} \\]
Putting $y=1$ in the second equation we get $x_2=\\var{s*(b22-mxB)}$
Hence the eigenvector we want is \\[\\begin{pmatrix} \\var{s*(b22-mxB)}\\\\1 \\end{pmatrix}\\]
\ne)
\nFor the last part we use the diagonalisation of $B$ given by the last two parts.
\nThus if $x_1,\\;\\;x_2,\\;\\;\\lambda_1,\\;\\;\\lambda_2$ are as above for $B$ then we have $B=PDP^{-1} \\Rightarrow B^{\\var{n}}=PD^{\\var{n}}P^{-1}$ where:
\n\\[\\begin{eqnarray*} P &=& \\begin{pmatrix} x_1 & x_2\\\\1&1 \\end{pmatrix} = \\begin{pmatrix} \\var{s*(b22-mnB)} & \\var{s*(b22-mxB)} \\\\1&1 \\end{pmatrix}\\Rightarrow P^{-1}= \\simplify[std]{1/{x1-x2}}\\begin{pmatrix} 1 & \\var{-s*(b22-mxB)} \\\\-1&\\var{s*(b22-mnB)} \\end{pmatrix}\\\\ \\\\ D&=& \\begin{pmatrix} \\lambda_1 & 0\\\\0&\\lambda_2 \\end{pmatrix} = \\begin{pmatrix} \\var{mnB} & 0\\\\0&\\var{mxB} \\end{pmatrix} \\Rightarrow D^{\\var{n}}=\\begin{pmatrix} \\var{mnB^n} & 0\\\\0&\\var{mxB^n} \\end{pmatrix} \\end{eqnarray*} \\]
\nHence \\[\\begin{eqnarray*}B^{\\var{n}}&=&PD^{\\var{n}}P^{-1}\\\\ \\\\ &=&\\simplify[std]{1/{x1-x2}}\\begin{pmatrix} \\var{s*(b22-mnB)} & \\var{s*(b22-mxB)} \\\\1&1 \\end{pmatrix}\\begin{pmatrix} \\var{mnB^n} & 0\\\\0&\\var{mxB^n} \\end{pmatrix}\\begin{pmatrix} 1 & \\var{-s*(b22-mxB)} \\\\-1&\\var{s*(b22-mnB)} \\end{pmatrix}\\\\ \\\\ &=&\\begin{pmatrix} \\var{bn11} & \\var{bn12}\\\\\\var{bn21}&\\var{bn22} \\end{pmatrix} \\end{eqnarray*} \\]
"}, {"name": "Find eigenvalues, characteristic polynomial and a normalised eigenvector of a 3x3 matrix", "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/"}], "variable_groups": [], "variables": {"eigen3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except[0,eigen1,eigen2])", "description": "", "name": "eigen3"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "1-g*a", "description": "", "name": "b"}, "invp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([0,1,g],[a,0,1],[b,1,0])", "description": "", "name": "invp"}, "det": {"templateType": "anything", "group": "Ungrouped variables", "definition": "eigen1*eigen2*eigen3", "description": "", "name": "det"}, "coefflam": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-(eigen1*eigen2+eigen1*eigen3+eigen2*eigen3)", "description": "", "name": "coefflam"}, "M": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p*D*invp", "description": "", "name": "M"}, "eigen2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except [0,eigen1])", "description": "", "name": "eigen2"}, "coefflamsq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "eigen1+eigen2+eigen3", "description": "", "name": "coefflamsq"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2..2 except 0)", "description": "", "name": "a"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "g"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([-1,g,1],[b,-g*b,1-b],[a,b,-a])", "description": "", "name": "p"}, "eigen1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "eigen1"}, "D": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([eigen1,0,0],[0,eigen2,0],[0,0,eigen3])", "description": "", "name": "D"}}, "ungrouped_variables": ["a", "b", "D", "g", "det", "M", "coefflamsq", "invp", "p", "coefflam", "eigen2", "eigen3", "eigen1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "eigen1", "minValue": "eigen1", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "eigen3", "minValue": "eigen3", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "You are given that $\\var{vector(1,-b,-a)}$ is an eigenvector of $M$.
\nFind the corresponding eigenvalue: [[0]]
\nAlso $\\var{vector(1,1-b,-a)}$ is an eigenvector of $M$.
\nFind the corresponding eigenvalue: [[1]]
\n", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "-lambda^3+{coefflamsq}*lambda^2+{coefflam}*lambda+{det}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "answersimplification": "all", "marks": 1, "vsetrangepoints": 5}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "eigen2", "minValue": "eigen2", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"answer": "{-b}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}, {"answer": "{b}/{g}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "Enter numbers as fractions or integers and not as decimals.
", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "Find the characteristic polynomial of $M$ and hence another eigenvalue for $M$.
\nEnter the characteristic polynomial in the form $P_M(\\lambda) = -\\lambda^3+a\\lambda^2+b\\lambda+c$.
\nWrite the letter $\\lambda$ as lambda
.
Characteristic polynomial: $P_M(\\lambda) = \\;$[[0]]
\nHence find another eigenvalue of $M$: [[1]]
\nFind a corresponding eigenvector for this eigenvalue. Scale your vector such that the first component is $1$. You have to find the other two components:
\nEigenvector = $\\Bigg($ $1$[[2]][[3]] $\\Bigg)$
\nInput both components as fractions or integers and not as decimals.
", "showCorrectAnswer": true, "marks": 0}], "statement": "Let $M=\\var{M}$. Answer the following questions.
", "tags": ["characteristic equation", "characteristic polynomial", "checked2015", "determinant", "eigenvalues", "eigenvectors", "linear algebra", "linear equations", "MAS1602", "matrices", "matrix algebra"], "rulesets": {}, "preamble": {"css": ".vector-input {\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n}\n.vector-input .component {\n float: center;\n clear: both;\n display: block !important;\n text-align: center;\n}\n.vector-input .part {\n margin-top: 0;\n margin-bottom: 0;\n}", "js": ""}, "type": "question", "metadata": {"notes": "Created 19/09/2014
", "licence": "Creative Commons Attribution 4.0 International", "description": "Given a 3 x 3 matrix, and two eigenvectors find their corresponding eigenvalues. Also fnd the characteristic polynomial and using this find the third eigenvalue and a normalised eigenvector $(x=1)$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "For the eigenvector $\\var{vector(1,-b,-a)}$ we have:
\n$\\var{M}\\var{vector(1,-b,-a)}=\\var{vector(eigen1,-eigen1*b,-eigen1*a)}=\\var{eigen1}\\var{vector(1,-b,-a)}$.
\nHence the corresponding eigenvalue is $\\var{eigen1}$.
\nSimilarly, for the eigenvector $\\var{vector(1,1-b,-a)}$ we have:
\n$\\var{M}\\var{vector(1,1-b,-a)}=\\var{vector(eigen3,eigen3*(1-b),-eigen3*a)}=\\var{eigen3}\\var{vector(1,1-b,-a)}$.
\nHence the corresponding eigenvalue for this eigenvector is $\\var{eigen3}$.
\nThe characteristic polynomial is given by $P_M(\\lambda)=\\operatorname{det}(M-\\lambda I_3)$. The roots of this are the eigenvalues.
\nWe find that in this case:
\n\\[\\begin{align}\\operatorname{det}(M-\\lambda I_3)&=\\operatorname{det}\\begin{pmatrix}\\var{m[0][0]}-\\lambda &\\var{m[0][1] }&\\var{m[0][2]}\\\\ \\var{m[1][0]}&\\var{m[1][1] }-\\lambda &\\var{m[1][2]}\\\\ \\var{m[2][0]}&\\var{m[2][1] } &\\var{m[2][2]}-\\lambda \\end{pmatrix}\\\\&=\\simplify{-lambda^3+{coefflamsq}*lambda^2+{coefflam}*lambda+{det}}\\end{align}\\]
\nNow we know that $\\simplify{lambda-{eigen1}}$ and $\\simplify{lambda-{eigen3}}$ are both factors of the characteristic polynomial.
\nHence we have:
\n$\\simplify{-lambda^3+{coefflamsq}*lambda^2+{coefflam}*lambda+{det}=-(lambda-{eigen1})(lambda-{eigen3})(lambda-r)}$ for some number $r$.
\nSince the constant term in the characteristic polynomial is the product of the three eigenvalues, $r=\\simplify[!basic]{{det}/({eigen1}*{eigen3})={eigen2}}$ and this is the third eigenvalue.
\nTo find an eigenvector corresponding to this eigenvalue we solve the equation:
\n$\\simplify{M*vector(x,y,z)={M}*vector(x,y,z)={eigen2}*vector(x,y,z)}$
\nThis gives the equations:
\n\\[\\begin{align} \\simplify{{m[0][0]}*x+{m[0][1]}*y+{m[0][2]}*z}&=\\simplify{{eigen2}*x}\\\\ \\simplify{{m[1][0]}*x+{m[1][1]}*y+{m[1][2]}*z}&=\\simplify{{eigen2}*y}\\\\ \\simplify{{m[2][0]}*x+{m[2][1]}*y+{m[2][2]}*z}&=\\simplify{{eigen2}*z}\\end{align}\\]
\nThe question asked you to find an eigenvector with $x=1$ and if we substitute this into the equations we find (only need to use two of the equations) that $y=\\var{-b}$ and $z=\\simplify[all,fractionNumbers]{{b}/{g}}$.
\nHence the eigenvector we want is $\\simplify[all,fractionNumbers]{vector(1,{-b},{b}/{g})}$.
"}, {"name": "Gauss elimination to solve a system of linear equations.", "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": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "George Stagg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/930/"}], "tags": ["checked2015", "columns", "gauss", "Gauss", "gauss elimination", "Gauss elimination", "Gaussian elimination", "gaussian elimination", "Linear algebra", "Linear Algebra", "linear algebra", "linear equations", "Linear equations", "matrices", "matrix", "reduced matrix", "row operators", "rows", "solving a system of linear equations", "Solving equations", "solving equations"], "metadata": {"description": "Solving a system of three linear equations in 3 unknowns using Gauss Elimination in 4 stages. Solutions are all integral.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Solve the system of equations using Gauss Elimination
\\[\\begin{eqnarray*} &\\var{a}x&+\\;&\\var{a*b-1}y&+\\;\\var{a^2*b-a-a*b}z&=&\\var{c2}\\\\ &\\var{a*c}x&+\\;&\\var{c*b}y&+\\;z&=&\\var{c1}\\\\ &x&+\\;&\\var{b}y&+\\;\\var{b*a-b}z&=&\\var{c3} \\end{eqnarray*} \\]
Part a) Rearrange the order of the equations and represent this as a system of equations using a matrix.
Part b) Introduce zeros in the first column using the first row.
Part c) Introduce zeros in the second coumn below the second entry in the second row using the second row.
Also need to solve for $z$ using the last row of the reduced matrix.
Part d) Solve for $y$ and $x$ using the second and first rows of the reduced matrix.
Look at the revealed answers for this question. All the information needed is there.
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variables": {"x": {"name": "x", "group": "Ungrouped variables", "definition": "c3-(b*a-b)*z-b*y", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "z": {"name": "z", "group": "Ungrouped variables", "definition": "c1+c2*c*(b-a*b)+c3*c*(a^2*b-a-a*b)", "description": "", "templateType": "anything"}, "c3": {"name": "c3", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "templateType": "anything"}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "a*c3-c2-a*z", "description": "", "templateType": "anything"}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "c3", "c2", "y", "x", "c1", "z"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Re-arrange the rows so that the third row becomes the first row, the first the second and the second the third.
WHY? Choose one of the following:
[[0]]
Now write down the entries of the matrix you will use for Gaussian Elimination, remember to include the constants as the last column.
\n[[1]]
\n", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 1, "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["To make sure that there is a 1 in the first row, first column position.
", "Because you always do this.
", "Why not.
", "I don't know.
"], "matrix": [1, 0, 0, 0], "distractors": ["", "", "", ""]}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": "2.4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([\n [1,b,b*a-b,c3],\n [a,a*b-1,a^2*b-a-a*b,c2],\n [a*c,b*c,1,c1]\n])", "correctAnswerFractions": false, "numRows": "3", "numColumns": "4", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Now introduce zeros in the first column below the first entry by adding:
[[0]] times the first row to the second row and
[[1]] times the first row to the third row to get the matrix:
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$\\var{1}$ | \n$\\var{b}$ | \n$\\var{b*a-b}$ | \n$\\var{c3}$ | \n\\[\\left) \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$\\var{0}$ | \n[[2]] | \n[[3]] | \n[[4]] | \n||
$\\var{0}$ | \n[[5]] | \n[[6]] | \n[[7]] | \n
Next multiply the second row by [[8]] to get a 1 in the second entry in the second row.
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.8, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-a}", "maxValue": "{-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.8, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-a*c}", "maxValue": "{-a*c}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.6, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-1}", "maxValue": "{-1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.6, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-a}", "maxValue": "{-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.6, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{c2-a*c3}", "maxValue": "{c2-a*c3}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.6, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{c*b-c*b*a}", "maxValue": "{c*b-c*b*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.6, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-a^2*b*c+1+a*b*c}", "maxValue": "{-a^2*b*c+1+a*b*c}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.6, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{c1-a*c*c3}", "maxValue": "{c1-a*c*c3}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.8, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-1}", "maxValue": "{-1}", "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, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Note that you should have multiplied the second row by a suitable number to get a $1$ in the second entry in the second row.
In this part we introduce a $0$ in the second column below the second entry in the second column by adding:
[[0]] times the second row to the third row to get the matrix:
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$\\var{1}$ | \n$\\var{b}$ | \n$\\var{b*a-b}$ | \n$\\var{c3}$ | \n\\[\\left) \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$\\var{0}$ | \n$\\var{1}$ | \n[[1]] | \n[[2]] | \n||
$\\var{0}$ | \n$\\var{0}$ | \n[[3]] | \n[[4]] | \n
From this you should find:
\n$z=\\;\\;$[[5]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.8, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-b*c+a*b*c}", "maxValue": "{-b*c+a*b*c}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.8, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{a}", "maxValue": "{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.8, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{a*c3-c2}", "maxValue": "{a*c3-c2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.8, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{1}", "maxValue": "{1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 0.8, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{b*c*(1-a)*(c2-a*c3)+c1-a*c*c3}", "maxValue": "{b*c*(1-a)*(c2-a*c3)+c1-a*c*c3}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{z}", "maxValue": "{z}", "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, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n \n \nFrom the second row of the reduced matrix you find an equation involving only $y$ and $z$ and using your value for $z$ we find:
\n \n \n \n$y=\\;\\;$[[0]]
\n \n \n \nThen using the first row we have the equation :
\\[\\simplify[all]{x+ {b}y+{b*a-b}z={c3}}\\]
Using this you can now find $x$:
\n \n \n \n$x=\\;\\;$[[1]]
\n \n \n ", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 3, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{y}", "maxValue": "{y}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2.6, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{x}", "maxValue": "{x}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Invert a 3x3 matrix using row operations", "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/"}], "variable_groups": [], "variables": {"a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "name": "a"}, "f1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "f1"}, "a22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*(a*b-1)*g2", "description": "", "name": "a22"}, "g3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "g3"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c2"}, "f2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "f2"}, "c3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c3"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "name": "b"}, "f3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "f3"}, "a33": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*g3", "description": "", "name": "a33"}, "b24": {"templateType": "anything", "group": "Ungrouped variables", "definition": "g2*a*f1*(1-(a*b-b-1)*a*c)", "description": "", "name": "b24"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2,3)", "description": "", "name": "c"}, "g1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1", "description": "", "name": "g1"}, "g2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "g2"}, "b25": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*g2*(a*(a*b*c-b*c)-1)", "description": "", "name": "b25"}, "a31": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*a*c*g1", "description": "", "name": "a31"}, "a23": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*(a^2*b-a-a*b)*g3", "description": "", "name": "a23"}, "a13": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1*(b*a-b)*g3", "description": "", "name": "a13"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "name": "c1"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*g2", "description": "", "name": "s"}, "a32": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f3*c*b*g2", "description": "", "name": "a32"}, "a12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1*b*g2", "description": "", "name": "a12"}, "a11": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f1*g1", "description": "", "name": "a11"}, "a21": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f2*a*g1", "description": "", "name": "a21"}}, "ungrouped_variables": ["a", "a11", "a12", "a13", "a21", "a22", "a23", "a31", "a32", "a33", "b", "b24", "b25", "c", "c1", "c2", "c3", "f1", "f2", "f3", "g1", "g2", "g3", "s"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f2*g2}", "minValue": "{-f2*g2}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-a*f2*g3}", "minValue": "{-a*f2*g3}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{ -f2*f1*a}", "minValue": "{ -f2*f1*a}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{f3*g2*c*b*(1-a)}", "minValue": "{f3*g2*c*b*(1-a)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{f3*g3*(1-a^2*b*c+a*b*c)}", "minValue": "{f3*g3*(1-a^2*b*c+a*b*c)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f3*f1*a*c}", "minValue": "{-f3*f1*a*c}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\nIntroduce zeros in the first column below the first entry by adding suitable multiples of the first row to rows 2 and 3.
\nInput all numbers as fractions or integers and not as decimals.
\n\n
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$\\var{a11}$ | \n$\\var{a12}$ | \n$\\var{a13}$ | \n$1$ | \n$0$ | \n$0$ | \n\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$0$ | \n[[0]] | \n[[1]] | \n[[2]] | \n$1$ | \n$0$ | \n||
$0$ | \n[[3]] | \n[[4]] | \n[[5]] | \n$0$ | \n$1$ | \n
Now, if necessary, multiply the second row by a suitable number so that the second entry in the second row is 1.
\n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{s*(-b*c+a*b*c)}", "minValue": "{s*(-b*c+a*b*c)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{a*g2*g3}", "minValue": "{a*g2*g3}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{ g2*a*f1}", "minValue": "{ g2*a*f1}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f2*g2}", "minValue": "{-f2*g2}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{f3*g3}", "minValue": "{f3*g3}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{(a*b-b-1)*f3*a*c*f1}", "minValue": "{(a*b-b-1)*f3*a*c*f1}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{-f2*f3*(a*b*c-b*c)}", "minValue": "{-f2*f3*(a*b*c-b*c)}", "correctAnswerFraction": false, "marks": 0.5, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\nNow using this matrix, introduce a zero in the second column below the second entry of the second column by:
\nAdding [[0]] times the second row to the third row to get the matrix:
\n\n
\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$\\var{a11}$ | \n$\\var{a12}$ | \n$\\var{a13}$ | \n$1$ | \n$0$ | \n$0$ | \n\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$0$ | \n$1$ | \n[[1]] | \n[[2]] | \n[[3]] | \n$0$ | \n||
$0$ | \n$0$ | \n[[4]] | \n[[5]] | \n[[6]] | \n$1$ | \n
Now, if necessary, multiply the third row by a suitable constant so that the third entry in the third column is 1.
\nWith this matrix, use the third row to introduce zeros into the second and first entries in the third column by adding suitable multiples of the third row to the second and first rows.
\nMultiply third row by [[0]]and add to the second row.
\nMultiply third row by [[1]]and add to the first row.
\nUsing this new matrix there is one more operation needed.
\nMultiplying the second row by $\\var{-a12}$ and adding to the first row to obtain the inverse matrix appearing on the right hand side.
\n\\[\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n$1$ | \n$0$ | \n$0$ | \n[[2]] | \n[[3]] | \n[[4]] | \n\\[\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n
$0$ | \n$1$ | \n$0$ | \n[[5]] | \n[[6]] | \n[[7]] | \n||
$0$ | \n$0$ | \n$1$ | \n[[8]] | \n[[9]] | \n[[10]] | \n
Find the inverse of the following matrix:
\\[A = \\left(\\begin{array}{rrr} \\var{a11} & \\var{a12} & \\var{a13}\\\\ \\var{a21} & \\var{a22} & \\var{a23}\\\\ \\var{a31} & \\var{a32} & \\var{a33}\\\\ \\end{array}\\right)\\]
Form the $3 \\times 6$ augmented matrix $B$ by placing $I_3$ to the right of $A$ as below:
\\[B = \\left(\\begin{array}{rrr|ccc} \\var{a11} & \\var{a12} & \\var{a13} &\\var{1}&\\var{0}&\\var{0}\\\\ \\var{a21} & \\var{a22} & \\var{a23}&\\var{0}&\\var{1}&\\var{0}\\\\ \\var{a31} & \\var{a32} & \\var{a33}&\\var{0}&\\var{0}&\\var{1}\\\\ \\end{array}\\right)\\]
In subsequent parts work with this matrix using row operations and introduce the identity matrix on the left hand side with the inverse of A eventually appearing on the right hand side.
\n ", "tags": ["MAS1602", "augmented matrices", "augmented matrix", "checked2015", "inverse matrix", "invertible matrices", "inverting a matrix", "linear algebra", "matrices", "matrix inverse", "matrix inversion"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t5/07/2012:
\n \t\tAdded tags.
\n \t\tChanged grammar in the question.
\n \t\tQuestion appears to be working correctly.
\n \t\t14/07/2012:
\n \t\tNeed to align columns where input takes place through the stages.
\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "$A$ a $3 \\times 3$ matrix. Using row operations on the augmented matrix $\\left(A | I_3\\right)$ reduce to $\\left(I_3 | A^{-1}\\right)$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "All of the working is now shown
"}, {"name": "Matrices: Manipulation", "extensions": ["stats"], "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": "George Stagg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/930/"}], "tags": ["checked2015", "Linear algebra", "Linear Algebra", "linear algebra", "matrices", "matrix", "matrix manipulation", "matrix multiplication", "multiply matrix", "products of matrices"], "metadata": {"description": "Elementary Exercises in multiplying matrices.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Answer the following questions on matrices.
\n", "advice": "", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variables": {"u": {"name": "u", "group": "Ungrouped variables", "definition": "random(3..4)", "description": "", "templateType": "anything"}, "a23": {"name": "a23", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}, "s5": {"name": "s5", "group": "Ungrouped variables", "definition": "if(m=3,0.5,-0.5)", "description": "", "templateType": "anything"}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "a11*v1+a12*v2+a13*v3", "description": "", "templateType": "anything"}, "b11": {"name": "b11", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "a22": {"name": "a22", "group": "Ungrouped variables", "definition": "random(-4,-3,-2,-1,1,2,3,5)", "description": "", "templateType": "anything"}, "s4": {"name": "s4", "group": "Ungrouped variables", "definition": "if(r=2,0.5,-0.5)", "description": "", "templateType": "anything"}, "s7": {"name": "s7", "group": "Ungrouped variables", "definition": "if(u=y,0.5,-0.5)", "description": "", "templateType": "anything"}, "s8": {"name": "s8", "group": "Ungrouped variables", "definition": "if(x=r,0.5,-0.5)", "description": "", "templateType": "anything"}, "mad": {"name": "mad", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),q),p))", "description": "", "templateType": "anything"}, "b23": {"name": "b23", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "templateType": "anything"}, "mac": {"name": "mac", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),n),m))", "description": "", "templateType": "anything"}, "a33": {"name": "a33", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "mag": {"name": "mag", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),u),w))", "description": "", "templateType": "anything"}, "ba32": {"name": "ba32", "group": "Ungrouped variables", "definition": "b31*a12+b32*a22+b33*a32", "description": "", "templateType": "anything"}, "b21": {"name": "b21", "group": "Ungrouped variables", "definition": "random(0..2)", "description": "", "templateType": "anything"}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "n+random(0,z)", "description": "", "templateType": "anything"}, "ab33": {"name": "ab33", "group": "Ungrouped variables", "definition": "a31*b13+a32*b23+a33*b33", "description": "", "templateType": "anything"}, "mah": {"name": "mah", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),x),y))", "description": "", "templateType": "anything"}, "mae": {"name": "mae", "group": "Ungrouped variables", "definition": "matrix(repeat(repeat(random(-2..9),s),r))", "description": "", "templateType": "anything"}, "ba22": {"name": "ba22", "group": "Ungrouped variables", "definition": "b21*a12+b22*a22+b23*a32", "description": "", "templateType": "anything"}, "a13": {"name": "a13", "group": "Ungrouped variables", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "ab13": {"name": "ab13", "group": "Ungrouped variables", "definition": "a11*b13+a12*b23+a13*b33", "description": "", "templateType": "anything"}, "w2": {"name": "w2", "group": "Ungrouped variables", "definition": "random(-4..4)", "description": "", "templateType": "anything"}, "r": {"name": "r", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "q1": {"name": "q1", "group": "Ungrouped variables", "definition": "b11*w1+b12*w2+b13*w3", "description": "", "templateType": "anything"}, "a32": {"name": "a32", "group": "Ungrouped variables", "definition": "random(-4..4)", "description": "", "templateType": "anything"}, "ab23": {"name": "ab23", "group": "Ungrouped variables", "definition": "a21*b13+a22*b23+a23*b33", "description": "", "templateType": "anything"}, "ba11": {"name": "ba11", "group": "Ungrouped variables", "definition": "b11*a11+b12*a21+b13*a31", "description": "", "templateType": "anything"}, "ab32": {"name": "ab32", "group": "Ungrouped variables", "definition": "a31*b12+a32*b22+a33*b32", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "ba31": {"name": "ba31", "group": "Ungrouped variables", "definition": "b31*a11+b32*a21+b33*a31", "description": "", "templateType": "anything"}, "a21": {"name": "a21", "group": "Ungrouped variables", "definition": "random(-1,0,1)", "description": "", "templateType": "anything"}, "v3": {"name": "v3", "group": "Ungrouped variables", "definition": "random(-5..5)", "description": "", "templateType": "anything"}, "s1": {"name": "s1", "group": "Ungrouped variables", "definition": "if(n=p,0.5,-0.5)", "description": "", "templateType": "anything"}, "ba33": {"name": "ba33", "group": "Ungrouped variables", "definition": "b31*a13+b32*a23+b33*a33", "description": "", "templateType": "anything"}, "v1": {"name": "v1", "group": "Ungrouped variables", "definition": "random(-3..3)", "description": "", "templateType": "anything"}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "[[s1,-s1],[s2,-s2],[s3,-s3],[s4,-s4],[s5,-s5],[s6,-s6],[s7,-s7],[s8,-s8],[s9,-s9],[s10,-s10]]", "description": "", "templateType": "anything"}, "w1": {"name": "w1", "group": "Ungrouped variables", "definition": "random(4..6)", "description": "", "templateType": "anything"}, "z": {"name": "z", "group": "Ungrouped variables", "definition": "random(-2,-1,1,2)", "description": "", "templateType": "anything"}, "c13": {"name": "c13", "group": "Ungrouped variables", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "p3": {"name": "p3", "group": "Ungrouped variables", "definition": "a31*v1+a32*v2+a33*v3", "description": "", "templateType": "anything"}, "s2": {"name": "s2", "group": "Ungrouped variables", "definition": "if(q=m,0.5,-0.5)", "description": "", "templateType": "anything"}, "q2": {"name": "q2", "group": "Ungrouped variables", "definition": "b21*w1+b22*w2+b23*w3", "description": "", "templateType": "anything"}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(3..4)", "description": "", "templateType": "anything"}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "u+random(0,z)", "description": "", "templateType": "anything"}, "c11": {"name": "c11", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}, "ab21": {"name": "ab21", "group": "Ungrouped variables", "definition": "a21*b11+a22*b21+a23*b31", "description": "", "templateType": "anything"}, "v2": {"name": "v2", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "ba12": {"name": "ba12", "group": "Ungrouped variables", "definition": "b11*a12+b12*a22+b13*a32", "description": "", "templateType": "anything"}, "b32": {"name": "b32", "group": "Ungrouped variables", "definition": "random(-3..3)", "description": "", "templateType": "anything"}, "b33": {"name": "b33", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}, "s9": {"name": "s9", "group": "Ungrouped variables", "definition": "if(w=3,0.5,-0.5)", "description": "", "templateType": "anything"}, "s10": {"name": "s10", "group": "Ungrouped variables", "definition": "if(u=3,0.5,-0.5)", "description": "", "templateType": "anything"}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "m+random(0,z)", "description": "", "templateType": "anything"}, "ab22": {"name": "ab22", "group": "Ungrouped variables", "definition": "a21*b12+a22*b22+a23*b32", "description": "", "templateType": "anything"}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "random(3..5)", "description": "", "templateType": "anything"}, "b22": {"name": "b22", "group": "Ungrouped variables", "definition": "random(-4,-3,-2,-1,1,2,3,4)", "description": "", "templateType": "anything"}, "p2": {"name": "p2", "group": "Ungrouped variables", "definition": "a21*v1+a22*v2+a23*v3", "description": "", "templateType": "anything"}, "a31": {"name": "a31", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "u+random(0,z)", "description": "", "templateType": "anything"}, "c12": {"name": "c12", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "ab11": {"name": "ab11", "group": "Ungrouped variables", "definition": "a11*b11+a12*b21+a13*b31", "description": "", "templateType": "anything"}, "ba21": {"name": "ba21", "group": "Ungrouped variables", "definition": "b21*a11+b22*a21+b23*a31", "description": "", "templateType": "anything"}, "ba23": {"name": "ba23", "group": "Ungrouped variables", "definition": "b21*a13+b22*a23+b23*a33", "description": "", "templateType": "anything"}, "q3": {"name": "q3", "group": "Ungrouped variables", "definition": "b31*w1+b32*w2+b33*w3", "description": "", "templateType": "anything"}, "ab12": {"name": "ab12", "group": "Ungrouped variables", "definition": "a11*b12+a12*b22+a13*b32", "description": "", "templateType": "anything"}, "ba13": {"name": "ba13", "group": "Ungrouped variables", "definition": "b11*a13+b12*a23+b13*a33", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(3..6 except m)", "description": "", "templateType": "anything"}, "b31": {"name": "b31", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random(4..6)", "description": "", "templateType": "anything"}, "s3": {"name": "s3", "group": "Ungrouped variables", "definition": "if(s=5,0.5,-0.5)", "description": "", "templateType": "anything"}, "s6": {"name": "s6", "group": "Ungrouped variables", "definition": "if(r=3,0.5,-0.5)", "description": "", "templateType": "anything"}, "ab31": {"name": "ab31", "group": "Ungrouped variables", "definition": "a31*b11+a32*b21+a33*b31", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "group": "Ungrouped variables", "definition": "random(-1,1,2)", "description": "", "templateType": "anything"}, "b12": {"name": "b12", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "w3": {"name": "w3", "group": "Ungrouped variables", "definition": "random(-4..4)", "description": "", "templateType": "anything"}, "b13": {"name": "b13", "group": "Ungrouped variables", "definition": "random(-2..2)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ba21", "a21", "a22", "a23", "b23", "b22", "b21", "ba22", "w3", "w2", "w1", "ba11", "a11", "ba13", "p1", "q1", "q", "q3", "q2", "ab23", "ab22", "ab21", "s3", "s2", "s1", "a12", "s7", "s6", "s5", "s4", "b12", "b13", "b11", "c13", "c12", "c11", "a33", "a32", "a31", "ba32", "ba33", "a13", "ba31", "s10", "s9", "b32", "b31", "v1", "v2", "v3", "mae", "mad", "mag", "mah", "ba12", "b33", "p2", "p3", "ba23", "ab11", "ab31", "ab32", "ab33", "ab12", "m", "s8", "n", "mac", "p", "s", "r", "u", "w", "v", "y", "x", "z", "ab13"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "
Let
\n\\[A = \\left(\\begin{array}{rrr} \\var{a11} & \\var{a12} & \\var{a13}\\\\ \\var{a21} & \\var{a22} & \\var{a23}\\\\ \\var{a31} & \\var{a32} & \\var{a33}\\\\ \\end{array}\\right),\\;\\;\\;\\; B= \\left(\\begin{array}{rrr} \\var{b11} & \\var{b12} & \\var{b13}\\\\ \\var{b21} & \\var{b22} & \\var{b23}\\\\ \\var{b31} & \\var{b32} & \\var{b33}\\\\ \\end{array}\\right),\\;\\;\\;\\; v= \\left(\\begin{array}{r} \\var{v1}\\\\ \\var{v2} \\\\ \\var{v3} \\end{array}\\right),\\;\\;\\;\\; w= \\left(\\begin{array}{r} \\var{w1}\\\\ \\var{w2} \\\\ \\var{w3} \\end{array}\\right)\\]
\nFind the following products:
\n$Av= $ [[0]]
\n$Bw= $ [[1]]
\n$BA= $ [[2]]
\n$AB= $ [[3]]
", "gaps": [{"type": "matrix", "useCustomName": true, "customName": "Av", "marks": "1.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([[p1],[p2],[p3]])", "correctAnswerFractions": false, "numRows": "3", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "Bw", "marks": "1.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([[q1],[q2],[q3]])", "correctAnswerFractions": false, "numRows": "3", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "BA", "marks": "4.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([ba11,ba12,ba13],\n [ba21,ba22,ba23],\n [ba31,ba32,ba33])", "correctAnswerFractions": false, "numRows": "3", "numColumns": "3", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": true, "customName": "AB", "marks": "4.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "matrix([ab11,ab12,ab13],\n [ab21,ab22,ab23],\n [ab31,ab32,ab33])", "correctAnswerFractions": false, "numRows": "3", "numColumns": "3", "allowResize": false, "tolerance": 0, "markPerCell": true, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Consider the following matrices together with the matrices from the first part of the question.
\n\\[\\begin{eqnarray}&C=& \\var{mac},\\;\\;\\;\\; &D=& \\var{mad},\\;\\;\\; \\;&E= &\\var{mae}\\\\&F=& \\left(\\begin{array}{rr} \\var{w1} & \\var{a12}\\\\ \\var{w2} & \\var{b23} \\\\ \\var{w3} & \\var{w2} \\\\\\var{v1} & \\var{b12}\\\\ 0 & \\var{-w2} \\end{array}\\right),\\;\\;\\;\\;&G=&\\var{mag},\\;\\;\\;\\;&H=&\\var{mah} \\end{eqnarray}\\]
\nWhich of the following products of matrices can be calculated?
\n[[0]]
\nPlease note that for every correct answer you get 0.5 marks and for every incorrect answer 0.5 is taken away. The minimum mark you can get is 0.
", "gaps": [{"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "choices": ["$CD$
", "$DC$
", "$EF$
", "$FE$
", "$BC$
", "$AE$
", "$GH$
", "$HE$
", "$AG$
", "$GB$
"], "matrix": "v", "layout": {"type": "all", "expression": ""}, "answers": ["Can be calculated", "Cannot be calculated"]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Solve simultaneous equations by finding inverse matrix, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "tags": ["checked2015", "inverse of a matrix", "Linear equations", "linear equations", "linear equations in matrix form", "matrices", "matrix", "matrix equations", "matrix form", "matrix multiplication", "multiply matrices", "multiply matrix", "solving linear equations", "system of linear equations", "tested1"], "metadata": {"description": "Putting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Rewrite the following system of equations as a matrix equation
\n\\[ \\mathbf{Av} = \\mathbf{b} \\]
\nfor a matrix $\\mathbf{A}$ and column vectors $\\mathbf{v}$ and $\\mathbf{b}$.
\n\\begin{align}
\\simplify[std]{ {ma[0][0]}x + {ma[0][1]}y} &= \\var{mb[0][0]} \\\\
\\simplify[std]{ {ma[1][0]}x + {ma[1][1]}y} &= \\var{mb[1][0]}
\\end{align}
Input all numbers as fractions or integers and not as decimals.
", "advice": "The equations can be written in the matrix form
\n\\[ \\var{ma}\\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\var{mb} \\]
\n$\\mathrm{det}(\\mathbf{A}) = \\simplify[]{ {ma[0][0]}*{ma[1][1]} - {ma[0][1]}*{ma[1][0]}} = \\var{det(ma)} \\neq 0$, so $\\mathbf{A}$ is invertible.
\n\\[ \\mathbf{A}^{-1} = \\simplify[fractionnumbers]{{ma_inverse}} \\]
\nWe have
\n\\begin{align}
\\mathbf{A}^{-1}\\mathbf{b} &= \\simplify[fractionnumbers]{{ma_inverse}*{mb}} \\\\
&= \\simplify[fractionnumbers]{{ma_inverse*mb}}
\\end{align}
Rearrange the equation $\\mathbf{Av}=\\mathbf{b}$ to make $\\mathbf{v}$ the subject:
\n\\begin{align}
\\mathbf{A}^{-1}\\mathbf{A}\\mathbf{v} &= \\mathbf{A}^{-1}\\mathbf{b} \\\\
\\mathbf{v} &= \\mathbf{A}^{-1}\\mathbf{b} \\\\ \\\\
\\end{align}
Hence,
\n\\[ \\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\simplify[fractionnumbers]{{ma_inverse*mb}} \\]
\nThat is,
\n\\begin{align}
x &= \\simplify[fractionnumbers]{{x}}, \\\\ \\\\
y &= \\simplify[fractionnumbers]{{y}}
\\end{align}
Matrix A. a10 is picked so it's non-singular, and a11 is never $\\pm a01$.
\nNo entry is 0.
", "templateType": "anything", "can_override": false}, "a10": {"name": "a10", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,a00,-a00,a00*a11/a01])", "description": "", "templateType": "anything", "can_override": false}, "ma_inverse": {"name": "ma_inverse", "group": "Ungrouped variables", "definition": "matrix([\n [ma[1][1], -ma[0][1]],\n [-ma[1][0], ma[0][0]]\n])/det(ma)", "description": "", "templateType": "anything", "can_override": false}, "a01": {"name": "a01", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "(ma_inverse*mb)[1][0]", "description": "", "templateType": "anything", "can_override": false}, "a11": {"name": "a11", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,a01,-a01])", "description": "", "templateType": "anything", "can_override": false}, "a00": {"name": "a00", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ma", "a00", "a01", "a10", "a11", "mb", "ma_inverse", "x", "y"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "$\\mathbf{A} = $ [[0]]
\n[[1]] | \n
[[2]] | \n
$\\mathbf{b} = $ [[3]]
Find the inverse of $\\mathbf{A}$.
\n$\\mathbf{A}^{-1} = $ [[0]]
", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "ma_inverse", "correctAnswerFractions": true, "numRows": "2", "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Now find $\\mathbf{A}^{-1}\\mathbf{b}$.
\n$\\mathbf{A}^{-1}\\mathbf{b} = $ [[0]]
", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "ma_inverse*mb", "correctAnswerFractions": true, "numRows": "2", "numColumns": 1, "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0, "prefilledCells": ""}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Finally, solve the equations.
\n$x = $ [[0]]
\n$y = $ [[1]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "x", "maxValue": "x", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "y", "maxValue": "y", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Combine linearly dependent vectors to get zero", "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/"}], "variable_groups": [], "variables": {"x": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rowvector(-a+b-c,-b+c,a-c,-a+b)", "description": "", "name": "x"}, "w": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rowvector(-al*a+(del-2*ga)*b-del*c,(del-al)*a-(del-ga)*b+del*c,(-del+2*al)*a+ga*b-del*c,(del-2*al)*a+(del-2*ga)*b)", "description": "", "name": "w"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "c"}, "z": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rowvector(-b-c,a+c,-a+b-c,a-b)", "description": "", "name": "z"}, "al": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2,-1,1,2)", "description": "", "name": "al"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "name": "t"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=2,1/(1-del),if(t=1,-al/(1-del),-(del-al-ga)/(1-del)))", "description": "", "name": "c2"}, "v4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(t=4,w,z)", "description": "", "name": "v4"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=1,1/(1-del),-al/(1-del))", "description": "", "name": "c1"}, "ga": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2,-1,1,2)", "description": "", "name": "ga"}, "y": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rowvector(b-c,a-b+c,-a-c,a+b)", "description": "", "name": "y"}, "v1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(t=1,w, x)", "description": "", "name": "v1"}, "c4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=4,1/(1-del),-ga/(1-del))", "description": "", "name": "c4"}, "c3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=3,1/(1-del),if(t=4,-ga/(1-del),-(del-al-ga)/(1-del)))", "description": "", "name": "c3"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "a"}, "del": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,-1,-3,-4)", "description": "", "name": "del"}, "v2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(t=1,x,t=2,w,y)", "description": "", "name": "v2"}, "v3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(t=3,w,t=4,z,y)", "description": "", "name": "v3"}}, "ungrouped_variables": ["a", "x", "c", "b", "ga", "al", "y", "v1", "v2", "v3", "v4", "t", "w", "c2", "c3", "del", "c1", "z", "c4"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "c1", "minValue": "c1", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "c2", "minValue": "c2", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "c3", "minValue": "c3", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "c4", "minValue": "c4", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "Find $a,\\;b,\\;c$ and $d$
\n$a=$ [[0]]
\n$b=$ [[1]]
\n$c=$ [[2]]
\n$d=$ [[3]]
\nInput all values as exact decimals.
", "showCorrectAnswer": true, "marks": 0}], "statement": "You are given the following four vectors in $\\mathbb{R}^4$: \\[\\begin{align} \\textbf{v}_1&=\\var{v1}\\\\ \\textbf{v}_2&=\\var{v2}\\\\ \\textbf{v}_3&=\\var{v3}\\\\ \\textbf{v}_4&=\\var{v4}\\end{align}\\]
\nYou are asked to show that the vectors $\\textbf{v}_1,\\;\\textbf{v}_2,\\;\\textbf{v}_3,\\;\\textbf{v}_4$ are linearly dependent.
\nFind real numbers $a,\\;b,\\;c$ and $d$ such that \\[a\\textbf{v}_1+b\\textbf{v}_2+c\\textbf{v}_3+d\\textbf{v}_4=\\textbf{0},\\;\\;\\; a+b+c+d=1\\]where $\\textbf{0}=\\var{rowvector(0,0,0,0)}$ is the zero vector.
\n", "tags": ["checked2015", "dependent vectors", "linear algebra", "linear combination of vectors", "linear dependence", "linear equations", "linearly dependent vectors", "MAS2223", "solving linear equations", "vectors"], "rulesets": {"std": ["all", "!collectNumbers", "!noleadingminus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "
10/02/2013:
\nFinished first draft. Need to resolve the display of row vectors etc.
\nDisplay of linear equations difficult to format e.g. variables under one another as got to use \\simplify where there are randomised coefficients.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Real numbers $a,\\;b,\\;c$ and $d$ are such that $a+b+c+d=1$ and for the given vectors $\\textbf{v}_1,\\;\\textbf{v}_2,\\;\\textbf{v}_3,\\;\\textbf{v}_4$ $a\\textbf{v}_1+b\\textbf{v}_2+c\\textbf{v}_3+d\\textbf{v}_4=\\textbf{0}$. Find $a,\\;b,\\;c,\\;d$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "On putting $a=1-b-c-d$ we have
\n\\[(1-b-c-d)\\textbf{v}_1+b\\textbf{v}_2+c\\textbf{v}_3+d\\textbf{v}_4=0\\]
\nHence on combining the vectors and equating the four components each to $0$ we have the four equations:
\n\\[\\begin{align} \\simplify[std]{{v1[0][0]} * (1 -b -c -d) + {v2[0][0]} * b + {v3[0][0]} * c + {v4[0][0]} * d }&= 0\\\\ \\simplify[std]{{v1[0][1]} * (1 -b -c -d) + {v2[0][1]} * b + {v3[0][1]} * c + {v4[0][1]} * d }&= 0\\\\ \\simplify[std]{{v1[0][2]} * (1 -b -c -d) + {v2[0][2]} * b + {v3[0][2]} * c + {v4[0][2]} * d }&= 0\\\\ \\simplify[std]{{v1[0][3]} * (1 -b -c -d) + {v2[0][3]} * b + {v3[0][3]} * c + {v4[0][3]} * d }&= 0\\end{align}\\]
\nOn rearranging these equations in the unknowns $b,\\;c,\\;d$ we get:
\n\\[\\begin{align} \\simplify[std]{{v2[0][0] -v1[0][0]} * b + {v3[0][0] -v1[0][0]} * c + {v4[0][0] -v1[0][0]} * d} &= \\var{-v1[0][0]}\\\\ \\simplify[std]{{v2[0][1] -v1[0][1]} * b + {v3[0][1] -v1[0][1]} * c + {v4[0][1] -v1[0][1]} * d }&= \\var{-v1[0][1]}\\\\ \\simplify[std]{{v2[0][2] -v1[0][2]} * b + {v3[0][2] -v1[0][2]} * c + {v4[0][2] -v1[0][2]} * d }&= \\var{-v1[0][2]}\\\\ \\simplify[std]{{v2[0][3] -v1[0][3]} * b + {v3[0][3] -v1[0][3]} * c + {v4[0][3] -v1[0][3]} * d}&= \\var{-v1[0][3]}\\end{align}\\]
\nOn solving these equations we see that although there are more equations than unknowns, the equations are consistent and they have the solution:
\n$b=\\var{c2}$, $c=\\var{c3}$, $d=\\var{c4}$ and hence $a=\\simplify[std]{1- {c2}-{c3}-{c4}= {c1}}$.
"}, {"name": "Determine if vectors form a spanning set", "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/"}], "variable_groups": [], "variables": {"contains": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mm[0]=1, \"contains\", \"does not contain\")", "description": "", "name": "contains"}, "mm": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(u=3 or u=6 or u=7 or u=8 or u=9,[1,0],[0,1])", "description": "", "name": "mm"}, "t0": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u<4,2,if(u<7,3,if(u<9,4,5)))", "description": "", "name": "t0"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "b"}, "f1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u<9,al,0)", "description": "", "name": "f1"}, "z": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[-b-c,a+c,-a+b-c,a-b]", "description": "", "name": "z"}, "q": {"templateType": "anything", "group": "Ungrouped variables", "definition": "list(al*vector(x)+be*vector(y))", "description": "", "name": "q"}, "nt": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mm[0]=1, \" \", \"not\")", "description": "", "name": "nt"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c5+a+b=0, if(c5+1=0,c5+2,c5+1),c5)", "description": "", "name": "c"}, "y": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[b-c,a-b+c,-a-c,a+b]", "description": "", "name": "y"}, "ep": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(al=0 and be=0,random(1,-1),if(al=0 and ga=0,random(1,-1), if(be=0 and ga=0,random(1,-1),0)))", "description": "", "name": "ep"}, "be": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1,-1)", "description": "", "name": "be"}, "ga1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(al1*be1=0,random(1,-1),0)", "description": "", "name": "ga1"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[-b+c,a-c,-a+b,a-b+c] ", "description": "", "name": "v"}, "v2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u>3,y,p1)", "description": "", "name": "v2"}, "x": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[-a+b-c,-b+c,a-c,-a+b]", "description": "", "name": "x"}, "v1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "x", "description": "", "name": "v1"}, "f2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u<4,0,be)", "description": "", "name": "f2"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "a"}, "f3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u<7,0,ga)", "description": "", "name": "f3"}, "es": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mm[0]=1,'','s')", "description": "", "name": "es"}, "thismany": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mm[0]=1,1,2)", "description": "", "name": "thismany"}, "p2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u=1 or u=4,list(al1*vector(x)+be1*vector(y)),\n if(u=2 or u=5 or u=7,list(al1*vector(x)+be1*vector(y)+ga1*vector(z)),\n list(al1*vector(x))))", "description": "", "name": "p2"}, "c5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "c5"}, "are": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mm[0]=1,\"is only\", \"are\")", "description": "", "name": "are"}, "al": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "al"}, "eg": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mm[0]=1,'','This is one of the relations.')", "description": "", "name": "eg"}, "be1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1,-1)", "description": "", "name": "be1"}, "v4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u=7 or u=8,p1,if(u=9,v,if(u=4 or u=1,p2,z)))", "description": "", "name": "v4"}, "r": {"templateType": "anything", "group": "Ungrouped variables", "definition": "list(al*vector(x)+be*vector(y)+ga*vector(z))", "description": "", "name": "r"}, "ga": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(al*be=0, random(1,-1),0)", "description": "", "name": "ga"}, "v5": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u=1 or u=4,z,if(u =2 or u=5 or u=7,p2, if(u=9,p1,v)))", "description": "", "name": "v5"}, "f4": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u<9,0,ep)", "description": "", "name": "f4"}, "al1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "al1"}, "u": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9 except [7,9])", "description": "", "name": "u"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "list(ep*vector(v))", "description": "", "name": "t"}, "p1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u<4,list(al*vector(x)),if(u<7,q,if(u<9,r,t)))", "description": "", "name": "p1"}, "another": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mm[0]=1, \"Hence this is a spanning set. \", \"There is one other simple relationship - you find this! So this is not a spanning set as it contains less than 4 linearly independent vectors.\")", "description": "", "name": "another"}, "v3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(u>6,z,if(u>3,p1,y))", "description": "", "name": "v3"}}, "ungrouped_variables": ["f1", "f2", "f3", "f4", "another", "eg", "al", "ga1", "are", "ga", "ep", "es", "contains", "be1", "nt", "be", "v1", "v2", "v3", "v4", "v5", "b", "c5", "al1", "a", "c", "p1", "thismany", "mm", "t0", "q", "p2", "r", "u", "t", "v", "y", "x", "z"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["Yes
", "No
"], "displayColumns": 0, "distractors": ["", ""], "shuffleChoices": true, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": [0, 1], "marks": 0}, {"displayType": "radiogroup", "choices": ["Yes
", "No
"], "displayColumns": 0, "distractors": ["", ""], "shuffleChoices": true, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "mm", "marks": 0}, {"displayType": "radiogroup", "choices": ["Yes
", "No
"], "displayColumns": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "matrix": "mm", "marks": 0}], "type": "gapfill", "prompt": "1. Is $\\{\\textbf{v}_1,\\;\\textbf{v}_2,\\;\\textbf{v}_3,\\;\\textbf{v}_4,\\;\\textbf{v}_5\\}$ a linearly independent set of vectors? [[0]]
\n\n
2. Do the above vectors form a spanning set of $\\mathbb{R}^4$? [[1]]
\n\n
3. Does the set $\\{\\textbf{v}_1,\\;\\textbf{v}_2,\\;\\textbf{v}_3,\\;\\textbf{v}_4,\\;\\textbf{v}_5\\}$ contain a linearly independent subset which forms a basis of $\\mathbb{R}^4$? [[2]]
", "showCorrectAnswer": true, "marks": 0}], "statement": "Consider the following $5$ vectors in $\\mathbb{R^4}$ .
\n\\[\\begin{align} \\textbf{v}_1&=\\var{rowvector(v1)}\\\\ \\textbf{v}_2&=\\var{rowvector(v2)}\\\\ \\textbf{v}_3&=\\var{rowvector(v3)}\\\\ \\textbf{v}_4&=\\var{rowvector(v4)}\\\\ \\textbf{v}_5&=\\var{rowvector(v5)}\\end{align}\\]
\nObserve: In this set of vectors at least one and sometimes two of the vectors are a simple linear combination of one or two of the previous vectors in the list. There are no other linear relations between the vectors.
\nHere, if a vector is in the span of the vectors earlier in the list then it will satisfy a simple relation of the form $\\textbf{v}_i=a\\textbf{v}_j +b\\textbf{v}_k$ where $a$ can be $0,\\;1$ or $-2$, similarly for $b$ .
", "tags": ["basis", "checked2015", "euclidean space", "linear algebra", "linear combination", "linear dependence", "linear independence", "linear spaces", "MAS2223", "span", "spanning set", "vector spaces"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "12/02/2013:
\nFirst draft finished.
\n06/11/2013:
\nGot rid of 2 cases which were incorrect (u=7,9). Tested and seems OK .
", "licence": "Creative Commons Attribution 4.0 International", "description": "Given $5$ vectors in $\\mathbb{R^4}$ determine if a spanning set for $\\mathbb{R^4}$ or not by looking for any simple dependencies between the vectors.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "1. Not linearly independent as any set of more than $4$ vectors in $\\mathbb{R^4}$ is linearly dependent.
\n2. They are spanning if any vector in $\\mathbb{R^4}$ can be written as a linear combination of these vectors. This means that there must be $4$ linearly independent vectors in the list. If there are not then it is not spanning.
\nGiven the hint in the question, if only one vector can be expressed as a linear combination of the others then there are $4$ linearly independent vectors.
\nHowever if two can be so expressed then there are only $3$ independent vectors and so cannot be spanning.
\nWe note that for this example there {are} {thismany} vector{es} dependent on the others. {eg} \\[\\textbf{v}_{\\var{t0}} =\\simplify{ {f1} * v_1+ {f2} * v _2 + {f3} * v_3 + {f4} * v_4}.\\]
\n{another}
\n\n
3. This set {contains} a linearly independent subset of $4$ vectors as it is {nt} spanning.
"}, {"name": "Do three given vectors form a spanning set and are they linearly independent?", "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/"}], "variable_groups": [{"variables": ["v1", "v2", "v3", "tt"], "name": "Shown to the student"}, {"variables": ["cannot", "only", "independent"], "name": "Strings"}, {"variables": ["is_independent", "t", "rs", "r1", "r2", "r3", "w_x", "w_y"], "name": "Setup"}, {"variables": ["marking_matrix_independent"], "name": "Marking"}, {"variables": ["w", "x", "y", "z"], "name": "Base vectors"}, {"variables": ["p", "q", "coeff_v1", "coeff_v2", "coeff_v3"], "name": "Solution"}], "variables": {"w": {"templateType": "anything", "group": "Base vectors", "definition": "w_x*x + w_y*y", "description": "A linear combination of x and y
", "name": "w"}, "x": {"templateType": "anything", "group": "Base vectors", "definition": "vector(-r1+r2-r3,-r2+r3,r1-r3,-r1+r2)", "description": "Linearly independent to y and z
", "name": "x"}, "r1": {"templateType": "anything", "group": "Setup", "definition": "rs[0]*random(-1,1)", "description": "", "name": "r1"}, "only": {"templateType": "anything", "group": "Strings", "definition": "if(t=4,\"only\", \"amongst an infinite number of solutions,\")", "description": "", "name": "only"}, "z": {"templateType": "anything", "group": "Base vectors", "definition": "vector(-r2-r3,r1+r3,-r1+r2-r3,r1-r2)", "description": "Linearly independent to x and y
", "name": "z"}, "tt": {"templateType": "anything", "group": "Shown to the student", "definition": "[if(t=4,2,t),if(t=1,2,1),if(t=3,2,3)]", "description": "The student is asked to write v_tt[0] as a sum of multiples of v_tt[1] and v_tt[2].
\ntt[0] is 2 if t=4, otherwise it's t. tt[1] and tt[2] are the two remaining indices, in increasing order.
", "name": "tt"}, "t": {"templateType": "anything", "group": "Setup", "definition": "if(is_independent,4,random(1,2,3))", "description": "Index of vector to write as a sum of multiples of the others. 4 if the vectors are linearly independent (in which case, the student will be asked to write v2 as a sum of multiples of v1 and v3)
", "name": "t"}, "coeff_v3": {"templateType": "anything", "group": "Solution", "definition": "[-q,-q,1,0][t-1]", "description": "Coefficient of v3 in the equation a*v1 + b*v2 + c*v3 = 0
", "name": "coeff_v3"}, "coeff_v1": {"templateType": "anything", "group": "Solution", "definition": "[1,-p,-p,0][t-1]", "description": "Coefficient of v1 in the equation a*v1 + b*v2 + c*v3 = 0
", "name": "coeff_v1"}, "rs": {"templateType": "anything", "group": "Setup", "definition": "shuffle(1..9)[0..3]", "description": "Three distinct random numbers
", "name": "rs"}, "marking_matrix_independent": {"templateType": "anything", "group": "Marking", "definition": "if(t=4,[1,0],[0,1])", "description": "Marking matrix for the \"are these vectors linearly independent?\" question
", "name": "marking_matrix_independent"}, "v2": {"templateType": "anything", "group": "Shown to the student", "definition": "switch(t=1,x,t=2,w,y)", "description": "", "name": "v2"}, "v1": {"templateType": "anything", "group": "Shown to the student", "definition": "switch(t=1,w, x)", "description": "", "name": "v1"}, "coeff_v2": {"templateType": "anything", "group": "Solution", "definition": "[-p,1,-q,0][t-1]", "description": "Coefficient of v2 in the equation a*v1 + b*v2 + c*v3 = 0
", "name": "coeff_v2"}, "p": {"templateType": "anything", "group": "Solution", "definition": "if(t=4,0,w_x)", "description": "Amount of x to use to make up -w
", "name": "p"}, "q": {"templateType": "anything", "group": "Solution", "definition": "if(t=4,0,w_y)", "description": "Amount of y to use to make up -w (the variable q asked for in part b)
", "name": "q"}, "w_y": {"templateType": "anything", "group": "Setup", "definition": "random(-2..2 except 0)", "description": "Multiple of y in w
", "name": "w_y"}, "cannot": {"templateType": "anything", "group": "Strings", "definition": "if(t=4,\"cannot \", \"\")", "description": "", "name": "cannot"}, "test": {"templateType": "anything", "group": "Ungrouped variables", "definition": "coeff_v1*v1 + coeff_v2*v2 + coeff_v3*v3", "description": "", "name": "test"}, "r3": {"templateType": "anything", "group": "Setup", "definition": "rs[2]*random(-1,1)", "description": "", "name": "r3"}, "is_independent": {"templateType": "anything", "group": "Setup", "definition": "random(true,false)", "description": "Should v1,v2,v3 be linearly independent?
", "name": "is_independent"}, "r2": {"templateType": "anything", "group": "Setup", "definition": "rs[1]*random(-1,1)", "description": "", "name": "r2"}, "w_x": {"templateType": "anything", "group": "Setup", "definition": "random(-2..2 except 0)", "description": "Multiple of z-y in w
", "name": "w_x"}, "y": {"templateType": "anything", "group": "Base vectors", "definition": "vector(r2-r3,r1-r2+r3,-r1-r3,r1+r2)", "description": "Linearly independent to x and z
", "name": "y"}, "independent": {"templateType": "anything", "group": "Strings", "definition": "if(is_independent,'independent','dependent')", "description": "", "name": "independent"}, "v3": {"templateType": "anything", "group": "Shown to the student", "definition": "switch(t=3,w,t=4,z,y)", "description": "", "name": "v3"}}, "ungrouped_variables": ["test"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"prompt": "1. Do these vectors form a spanning set for $\\mathbb{R^4}$? [[0]]
\n2. Is $\\{\\mathbf{v}_1,\\;\\mathbf{v}_2,\\;\\mathbf{v}_3\\}$ a linearly independent set of vectors?[[1]]
", "scripts": {}, "gaps": [{"displayType": "radiogroup", "choices": ["Yes
", "No
"], "showCorrectAnswer": true, "displayColumns": 0, "distractors": ["", ""], "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "matrix": [0, 1], "marks": 0}, {"displayType": "radiogroup", "choices": ["Yes
", "No
"], "variableReplacementStrategy": "originalfirst", "matrix": "marking_matrix_independent", "variableReplacements": [], "shuffleChoices": false, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "showCorrectAnswer": true, "displayColumns": 0, "marks": 0}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "Do there exist integers $p$ and $q$ such that the equation $\\mathbf{v}_{\\var{tt[0]}}=p\\mathbf{v}_{\\var{tt[1]}}+q\\mathbf{v}_{\\var{tt[2]}}$ holds?
\nIf you cannot find such an expression, input 0
for both $p$ and $q$.
$p=$ [[0]]
\n$q=$ [[1]]
", "scripts": {}, "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "allowFractions": false, "type": "numberentry", "maxValue": "p", "minValue": "p", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "showPrecisionHint": false}, {"correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "allowFractions": false, "type": "numberentry", "maxValue": "q", "minValue": "q", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "statement": "You are given the following three vectors in $\\mathbb{R}^4$:
\n\\[ \\mathbf{v}_1=\\var{v1}, \\quad \\mathbf{v}_2=\\var{v2}, \\quad \\mathbf{v}_3=\\var{v3}\\]
", "tags": ["checked2015", "dependent vectors", "linear algebra", "linear combination of vectors", "linear dependence", "linear equations", "linear independence", "linearly dependent vectors", "linearly independent", "MAS2223", "solving linear equations", "vectors"], "rulesets": {"std": ["all", "!collectNumbers", "!noleadingminus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "11/02/2013:
\nFinished first draft. Need to resolve the display of row vectors etc.
\nDisplay of linear equations difficult to format e.g. variables under one another as got to use \\simplify where there are randomised coefficients.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Given the following three vectors $\\textbf{v}_1,\\;\\textbf{v}_2,\\;\\textbf{v}_3$ Find out whether they are a linearly independent set are not. Also if linearly dependent find the relationship $\\textbf{v}_{r}=p\\textbf{v}_{s}+q\\textbf{v}_{t}$ for suitable $r,\\;s,\\;t$ and integers $p,\\;q$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "1. These vectors cannot form a spanning set as you need at least 4 vectors to form a spanning set in $\\mathbb{R^4}$.
\n2. $\\mathbf{v}_1, \\; \\mathbf{v}_2 , \\; \\mathbf{v}_3$ is a linearly independent set if the only solution for \\[ a \\mathbf{v}_1 + b \\mathbf{v}_2 + c \\mathbf{v}_3 = \\var{vector(0,0,0,0)} \\qquad \\textbf{(1)}\\] is $a=0$, $b=0$, $c=0$.
\nIf there is any other solution then the set is linearly dependent. Note that if there is one other solution then there will be an infinite number of such solutions.
\nOn writing out the components given by equation (1), we see that we get the following four equations:
\n\\[\\begin{align} \\simplify[std]{{v1[0]} * a + {v2[0]} * b + {v3[0]} * c }&= 0\\\\ \\simplify[std]{{v1[1]} * a + {v2[1]} * b + {v3[1]} * c }&= 0\\\\ \\simplify[std]{{v1[2]} *a+ {v2[2]} * b + {v3[2]} * c }&= 0\\\\ \\simplify[std]{{v1[3]} *a+ {v2[3]} * b + {v3[3]} * c }&= 0\\end{align}\\]
\nWe see that on solving these equations that there is {only} the solution:
\n\\[a = \\var{coeff_v1}, \\; b=\\var{coeff_v2}, \\; c=\\var{coeff_v3}\\]
\nIt follows that $\\{\\mathbf{v}_1, \\; \\mathbf{v}_2 , \\; \\mathbf{v}_3\\}$ is a linearly {independent} set of vectors.
\nBecause the vectors $\\mathbf{v}_1$, $\\mathbf{v}_2$ and $\\mathbf{v}_3$ are linearly independent, input 0
for both $p$ and $q$.Rearrange equation (1) to give \\[ \\var{[a,b,c][tt[0]-1]}\\mathbf{v}_{\\var{tt[0]}} = -\\var{[a,b,c][tt[1]-1]}\\mathbf{v}_{\\var{tt[1]}} - \\var{[a,b,c][tt[2]-1]}\\mathbf{v}_{\\var{tt[2]}}\\] So, using the solution found above, $p=-\\var{[a,b,c][tt[1]-1]} = \\var{p}$ and $q =-\\var{[a,b,c][tt[2]-1]} = \\var{q}$.
Your task is to find a basis for $\\mathbb{R^4}$ by finding a linearly independent subset of these vectors.
\nStart from $\\textbf{v}_1$ and work through each vector in turn.
\nDetermine if a vector is a linear combination of the previous vectors in the list.
\nIf it is not such a linear combination then include it in the basis by choosing Yes, otherwise choose No.
\nNote that if a vector $\\textbf{v}_i$ for $i=2,\\ldots 5$ is a linear combination of the previous vectors in the list then it will satisfy a simple relation of the form $ \\textbf{v}_i=a\\textbf{v}_j +b\\textbf{v}_k$ where $a$ can be $0,\\;1$ or $-1$ similarly for $b$.
\nWhen you get to $\\textbf{v}_6$ it will be obvious if it is in the spanning set or not. (why?)
\n[[0]]
\n", "variableReplacements": [], "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "
Consider the following $6$ vectors in $\\mathbb{R^4}$ . .
\n\\[\\begin{align} \\textbf{v}_1&=\\var{rowvector(v1)}\\\\ \\textbf{v}_2&=\\var{rowvector(v2)}\\\\ \\textbf{v}_3&=\\var{rowvector(v3)}\\\\ \\textbf{v}_4&=\\var{rowvector(v4)}\\\\ \\textbf{v}_5&=\\var{rowvector(v5)}\\\\ \\textbf{v}_6&=\\var{rowvector(v6)}\\end{align}\\]
\nYou are given that this set of vectors is a spanning set for $\\mathbb{R^4}$
", "tags": ["basis", "checked2015", "euclidean space", "linear algebra", "linear combination", "linear dependence", "linear independence", "linear spaces", "linearly dependent", "span", "spanning set", "vector spaces"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Given $6$ vectors in $\\mathbb{R^4}$ and given that they span $\\mathbb{R^4}$ find a basis.
"}, "advice": "Clearly $\\textbf{v}_1$ is always in the required basis as it is non-zero.
\n$\\textbf{v}_2$ is {nt2} in the required basis as it is {ont2} a multiple of $\\textbf{v}_1$.
\n$\\textbf{v}_3$ is {nt3} in the required basis as it is {ont3} a linear combination of $\\textbf{v}_1$ and $\\textbf{v}_2$.
\n$\\textbf{v}_4$ is {nt4} in the required basis as it is {ont4} a linear combination of previous vectors.
\n{message4}
\n$\\textbf{v}_5$ is {nt5} in the required basis as it is {ont5} a linear combination of previous vectors.
\n{message5}
\n$\\textbf{v}_6$ is {nt6} in the required basis as it is {ont6} a linear combination of previous vectors.
\n"}, {"name": "Are given matrices in (reduced) row echelon form?", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "tags": ["checked2015", "echelon form", "linear algebra", "matrices", "matrixx", "MCQ", "reduced echelon form", "row reduced"], "metadata": {"description": "
Choose which of 5 matrices are in a) row echelon form but not reduced b) reduced row echelon form c) neither.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "\nEchelon Forms
\nFor each of the following matrices choose which are:
\na) In row echelon form but not in reduced row echelon form.
\nb) In reduced row echelon form.
\nc) Neither a) nor b).
\n ", "advice": "Look at your notes for the definition of echelon form.
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"w": {"name": "w", "group": "Ungrouped variables", "definition": "random(0,random(-9..9 except 0))", "description": "", "templateType": "anything", "can_override": false}, "g15": {"name": "g15", "group": "Ungrouped variables", "definition": "if(t=2 or t=4,random(-9..9),0)", "description": "", "templateType": "anything", "can_override": false}, "u2": {"name": "u2", "group": "Ungrouped variables", "definition": "random(0,random(1..9))", "description": "", "templateType": "anything", "can_override": false}, "v": {"name": "v", "group": "Ungrouped variables", "definition": "[[0,0,0.6],[mb1,mb2,mb3],[0,0,0.6],[0,0.6,0],[mf1,mf2,0]]", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "\n matrix([0,random(-9..9),random(1..5),-random(1..5)],\n [random(1..5),0,b23,random(1..5)],\n [random(1..5),random(-9..9),0,0])\n \n ", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "\n matrix([0,0,1,0,random(-5..5)],\n [1,0,random(-5..5),0,random(1..9)],\n [0,1,random(-9..9),0,1+random(-5..5)],\n [0,0,0,1,-random(1..9)])\n ", "description": "", "templateType": "anything", "can_override": false}, "c13": {"name": "c13", "group": "Ungrouped variables", "definition": "if(b23=1,w,random(-9..9))", "description": "", "templateType": "anything", "can_override": false}, "g23": {"name": "g23", "group": "Ungrouped variables", "definition": "if(t=2 or t=3, random(-9..9),if(t=4 or t=5,1,0))", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(1..6)", "description": "", "templateType": "anything", "can_override": false}, "mb3": {"name": "mb3", "group": "Ungrouped variables", "definition": "0.6-mb1-mb2", "description": "", "templateType": "anything", "can_override": false}, "mf2": {"name": "mf2", "group": "Ungrouped variables", "definition": "0.6-mf1", "description": "", "templateType": "anything", "can_override": false}, "g33": {"name": "g33", "group": "Ungrouped variables", "definition": "if(t=1,1,0)", "description": "", "templateType": "anything", "can_override": false}, "g35": {"name": "g35", "group": "Ungrouped variables", "definition": "if(t=3 or t=5 or t=6,1,if(t=1,0,random(-9..9)))", "description": "", "templateType": "anything", "can_override": false}, "mb2": {"name": "mb2", "group": "Ungrouped variables", "definition": "if(c12=1 and w=0,0.6,0)", "description": "", "templateType": "anything", "can_override": false}, "mf1": {"name": "mf1", "group": "Ungrouped variables", "definition": "if((u1=0)AND (u2=0),0,0.6)", "description": "", "templateType": "anything", "can_override": false}, "b23": {"name": "b23", "group": "Ungrouped variables", "definition": "if(c12=1,1,random(1..4))", "description": "", "templateType": "anything", "can_override": false}, "u1": {"name": "u1", "group": "Ungrouped variables", "definition": "random(0,random(-4..4 except 0))", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "\n matrix([0,c12,c13,random(-9..9)],\n [0,0,b23,random(1..5)],\n [0,0,0,0])\n ", "description": "", "templateType": "anything", "can_override": false}, "g14": {"name": "g14", "group": "Ungrouped variables", "definition": "if(t=1 or t=3 or t=5,random(-9..9),0)", "description": "", "templateType": "anything", "can_override": false}, "g12": {"name": "g12", "group": "Ungrouped variables", "definition": "if(t<4,0,random(-9..9))", "description": "", "templateType": "anything", "can_override": false}, "g22": {"name": "g22", "group": "Ungrouped variables", "definition": "if(t<4,1,0)", "description": "", "templateType": "anything", "can_override": false}, "g13": {"name": "g13", "group": "Ungrouped variables", "definition": "if(t=2 or t=3 or t=6,random(-9..9),0)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "\n matrix([1,g12,g13,g14,g15,g16],\n [0,g22,g23,g24,g25,g26],\n [0,0,g33,g34,g35,g36],\n [0,0,0,0,g45,g46])\n \n ", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "\n matrix([1,random(-5..5),0,u1,0,0],\n [0,0,0,1,u2,random(1..9)],\n [0,0,0,0,1,0],\n [0,0,0,0,0,0])\n ", "description": "", "templateType": "anything", "can_override": false}, "mb1": {"name": "mb1", "group": "Ungrouped variables", "definition": "if(c12=1, if(w=0,0,0.6),0)", "description": "", "templateType": "anything", "can_override": false}, "g24": {"name": "g24", "group": "Ungrouped variables", "definition": "if(t=1 or t=3 or t=5,random(-9..9),if(t=6,1,0))", "description": "", "templateType": "anything", "can_override": false}, "c12": {"name": "c12", "group": "Ungrouped variables", "definition": "random(1,random(-9..9 except 1))", "description": "", "templateType": "anything", "can_override": false}, "g25": {"name": "g25", "group": "Ungrouped variables", "definition": "if(t=2 or t=4,random(-9..9),0)", "description": "", "templateType": "anything", "can_override": false}, "g36": {"name": "g36", "group": "Ungrouped variables", "definition": "if(t=1,random(-9..9),0)", "description": "", "templateType": "anything", "can_override": false}, "g16": {"name": "g16", "group": "Ungrouped variables", "definition": "if(t=1,random(-9..9),0)", "description": "", "templateType": "anything", "can_override": false}, "g46": {"name": "g46", "group": "Ungrouped variables", "definition": "if(t=1,random(-9..9),1)", "description": "", "templateType": "anything", "can_override": false}, "g26": {"name": "g26", "group": "Ungrouped variables", "definition": "if(t=1,random(-9..9),0)", "description": "", "templateType": "anything", "can_override": false}, "g45": {"name": "g45", "group": "Ungrouped variables", "definition": "if(t=1,1,0)", "description": "", "templateType": "anything", "can_override": false}, "g34": {"name": "g34", "group": "Ungrouped variables", "definition": "if(t=3 or t=5 or t=6,0,if(t=1,random(-9..9),1))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["b23", "d", "g26", "g24", "g25", "g22", "g23", "u1", "u2", "g45", "g46", "c13", "c12", "g33", "mf1", "mf2", "mb1", "mb2", "mb3", "a", "c", "b", "g35", "g34", "g36", "f", "t", "w", "v", "g16", "g15", "g14", "g13", "g12"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_x", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": true, "shuffleAnswers": false, "displayType": "radiogroup", "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["$\\var{a}$", "$\\var{b}$", "$\\var{c}$", "$\\var{d}$", "$\\var{f}$"], "matrix": "v", "layout": {"type": "all", "expression": ""}, "answers": ["In row echelon form but not reduced", "In reduced row echelon form", "Neither"]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Finding bases for the null space and row space of a matrix", "extensions": ["stats"], "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/"}], "variable_groups": [], "variables": {"column_basis": {"group": "Ungrouped variables", "templateType": "anything", "definition": "set(map(trtestmatrix[x],x,echelonform[1]))", "description": "", "name": "column_basis"}, "maxint": {"group": "Ungrouped variables", "templateType": "anything", "definition": "4", "description": "", "name": "maxint"}, "testmatrix": {"group": "Ungrouped variables", "templateType": "anything", "definition": "matrix(rdmat)*matrix(ech)", "description": "", "name": "testmatrix"}, "deter": {"group": "Ungrouped variables", "templateType": "anything", "definition": "rref(rdmat,0)[3]", "description": "", "name": "deter"}, "record": {"group": "Ungrouped variables", "templateType": "anything", "definition": "rref(list(testmatrix),0)", "description": "", "name": "record"}, "freecols": {"group": "Ungrouped variables", "templateType": "anything", "definition": "map(transpose(echmatrix)[nbasis_column[x]-1][0..columns-1],x,0..length(nbasis_column)-1)", "description": "", "name": "freecols"}, "echelonform": {"group": "Ungrouped variables", "templateType": "anything", "definition": "echelon_form_matrix(rows,rank,columns,maxint)", "description": "", "name": "echelonform"}, "nullity": {"group": "Ungrouped variables", "templateType": "anything", "definition": "5-rank", "description": "", "name": "nullity"}, "othercols": {"group": "Ungrouped variables", "templateType": "anything", "definition": "list(set(1,2,3,4,5)-set(echform))", "description": "", "name": "othercols"}, "ech": {"group": "Ungrouped variables", "templateType": "anything", "definition": "echelonform[0]", "description": "", "name": "ech"}, "colmark": {"group": "Ungrouped variables", "templateType": "anything", "definition": "colmar(z,echform)", "description": "", "name": "colmark"}, "rank": {"group": "Ungrouped variables", "templateType": "anything", "definition": "3\n", "description": "", "name": "rank"}, "trtestmatrix": {"group": "Ungrouped variables", "templateType": "anything", "definition": "transpose(testmatrix)", "description": "", "name": "trtestmatrix"}, "columns": {"group": "Ungrouped variables", "templateType": "anything", "definition": "5", "description": "", "name": "columns"}, "echmatrix": {"group": "Ungrouped variables", "templateType": "anything", "definition": "matrix(ech)", "description": "", "name": "echmatrix"}, "sum": {"group": "Ungrouped variables", "templateType": "anything", "definition": "sum(echform)", "description": "", "name": "sum"}, "record_ops_message": {"group": "Ungrouped variables", "templateType": "anything", "definition": "record[1]", "description": "", "name": "record_ops_message"}, "record_ops_matrix": {"group": "Ungrouped variables", "templateType": "anything", "definition": "record[0]", "description": "", "name": "record_ops_matrix"}, "c0": {"group": "Ungrouped variables", "templateType": "anything", "definition": "map(fill(echform[x]-1,othercols[0]-1,echmatrix[x][othercols[0]-1]),x,0..2)", "description": "", "name": "c0"}, "rows": {"group": "Ungrouped variables", "templateType": "anything", "definition": "6", "description": "", "name": "rows"}, "coordcol": {"group": "Ungrouped variables", "templateType": "anything", "definition": "map(id(5)[nbasis_column[x]-1],x,0..length(nbasis_column)-1)", "description": "", "name": "coordcol"}, "null_basis": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch(sum=6,[[ec[0][2]*ec[2][3]-ec[0][3],ec[1][2]*ec[2][3]-ec[1][3],-ec[2][3],1,0],\n [ec[0][2]*ec[2][4]-ec[0][4],ec[1][2]*ec[2][4]-ec[1][4],-ec[2][4],0,1]],\n sum=7,[[-ec[0][2],-ec[1][2],1,0,0],[-ec[0][4],-ec[1][4],0,-ec[2][4],1]],\n (sum=8) and(5 in echform),[[-ec[0][2],-ec[1][2],1,0,0],[-ec[0][3],-ec[1][3],0,1,0]],\n sum=8,[[-ec[0][1],1,0,0,0],[-ec[0][4],0,-ec[1][4],-ec[2][4],1]],\n sum=9,[[-ec[0][1],1,0,0,0],[-ec[0][3],0,-ec[1][3],1,0]],\n [[-ec[0][1],1,0,0,0],[-ec[0][2],0,1,0,0]])", "description": "", "name": "null_basis"}, "rref1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "rref1(list(testmatrix))[0]", "description": "", "name": "rref1"}, "chosen": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[true,true,false,true,false]", "description": "", "name": "chosen"}, "steps": {"group": "Ungrouped variables", "templateType": "anything", "definition": "rref(list(testmatrix),0)[2]", "description": "", "name": "steps"}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "map(fill(echform[x]-1,othercols[1]-1,echmatrix[x][othercols[1]-1]),x,0..2)", "description": "", "name": "c1"}, "rdmat": {"group": "Ungrouped variables", "templateType": "anything", "definition": "rdmat(rows)", "description": "", "name": "rdmat"}, "echform": {"group": "Ungrouped variables", "templateType": "anything", "definition": "map(x+1,x,echelonform[1])", "description": "", "name": "echform"}, "student_cols_matrix": {"group": "Ungrouped variables", "templateType": "anything", "definition": "transpose(matrix(map(transpose(echmatrix)[n],n,filter(chosen[j],j,0..4))))", "description": "", "name": "student_cols_matrix"}, "nbasis_column": {"group": "Ungrouped variables", "templateType": "anything", "definition": "list(set(1,2,3,4,5)-set(echform))", "description": "", "name": "nbasis_column"}, "z": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[0,0,0,0,0]", "description": "", "name": "z"}, "not_chosen_col": {"group": "Ungrouped variables", "templateType": "anything", "definition": "transpose(matrix(map(transpose(echmatrix)[n],n,filter(!chosen[j],j,0..4)))[0])", "description": "", "name": "not_chosen_col"}, "ec": {"group": "Ungrouped variables", "templateType": "anything", "definition": "echmatrix", "description": "", "name": "ec"}}, "ungrouped_variables": ["echelonform", "ech", "echform", "testmatrix", "record", "rref1", "record_ops_matrix", "record_ops_message", "rank", "maxint", "steps", "rdmat", "deter", "nullity", "echmatrix", "trtestmatrix", "nbasis_column", "coordcol", "freecols", "rows", "columns", "column_basis", "sum", "null_basis", "ec", "chosen", "student_cols_matrix", "not_chosen_col", "othercols", "c0", "c1", "colmark", "z"], "rulesets": {}, "functions": {"solution": {"type": "html", "language": "javascript", "definition": "function st(o){\n return '['+o.toString()+']';\n}\nfunction display_format(mat){\nvar s= st(mat.map(st));\n return '$\\\\simplify[fractionNumbers]{{matrix('+s+')}}$';\n}\nvar table = $(''+mess+' | ');\ntable.append('||||||
'+m+' |
'+mess+' | ');\ntable.append('||||||
'+m+' |
\\[\\left( \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n[[0]] | \n[[1]] | \n[[2]] | \n[[3]] | \n[[4]] | \n\\[\\left) \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\\\end{matrix} \\right.\\] | \n
$0$ | \n[[5]] | \n[[6]] | \n[[7]] | \n[[8]] | \n||
$0$ | \n$0$ | \n[[9]] | \n[[10]] | \n[[11]] | \n||
$0$ | \n$0$ | \n$0$ | \n[[12]] | \n[[13]] | \n||
$0$ | \n$0$ | \n$0$ | \n$0$ | \n[[14]] | \n
Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$ with coefficients in the real numbers.
\nLet the linear map $\\phi: P_4 \\rightarrow P_4$ be defined by:
\n\\[\\phi(p(x))=p(\\var{a})+p(\\simplify{{b}x+{c}})\\]
\nThis is given by evaluating $p(x)$ at $x=\\var{a}$ and adding this to the polynomial given by replacing $x$ by $\\simplify{{b}x+{c}}$ in $p(x)$.
\nFor example:
\n$\\phi(x^2+2x)=\\simplify[all,!collectnumbers,!noleadingminus]{{a}^2+2*{a}+({b}x+{c})^2+2*({b}x+{c})={a^2+2*a+2*c}+{2*b*c+2*b}*x+{b^2}*x^2}$.
\nUsing the standard basis for range and domain find the matrix given by $\\phi$.
", "tags": ["basis", "checked2015", "linear map", "linear spaces", "MAS2223", "matrix", "matrix given by a basis", "matrix of a linear map", "poynomials", "vector spaces"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "15/02/2013:
\nFirst draft finished.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$ with coefficients in the real numbers. Let the linear map $\\phi: P_4 \\rightarrow P_4$ be defined by: \\[\\phi(p(x))=p(a)+p(bx+c).\\]Using the standard basis for range and domain find the matrix given by $\\phi$.
"}, "advice": "We have:
\n\\[\\phi(1)=\\simplify[all,!zerofactor,!collectNumbers,!constantsfirst,!noleadingminus]{1+1= 2*1= 2 * 1 + 0 * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]
\ngives the first column of the matrix.
\n\\[\\phi(x)=\\simplify[all,!zerofactor,!collectNumbers,!constantsfirst,!noleadingminus]{{a}+ ({b} * x + {c}) = {a+c} + {b} * x = {a+c} * 1 + {b} * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]
\ngives the second column of the matrix.
\n\\[\\phi(x^2)=\\simplify[all,!zerofactor,!collectNumbers,!constantsfirst,!noleadingminus]{ {a}^ 2 + ({b} * x + {c})^2 = {a^2+c^2} + {2 * b* c} * x + {b^2} * x ^ 2 = {a^2+c^2} * 1 + {2*b*c} * x + {b^2} * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]
\n\n
gives the third column of the matrix.
\nContinuing on in this way for $\\phi(x^3),\\;\\phi(x^4)$ we obtain the matrix for $\\phi$ with respect to the given bases for domain and range.
\n\n
\\[\\begin{pmatrix}\\var{2}&\\var{a+c}&\\var{a^2+c^2}&\\var{a^3+c^3}&\\var{a^4+c^4}\\\\0&\\var{b}&\\var{2*b*c}&\\var{3*b*c^2}&\\var{4*b*c^3}\\\\0&0&\\var{b^2}&\\var{3*b^2*c}&\\var{6*b^2*c^2}\\\\0&0&0&\\var{b^3}&\\var{4*b^3*c}\\\\0&0&0&0&\\var{b^4}\\end{pmatrix}\\]
"}, {"name": "Represent a linear map as a matrix with a given basis", "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/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "name": "d"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "name": "a"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9 except 0)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)", "description": "", "name": "c"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except 0)", "description": "", "name": "f"}}, "ungrouped_variables": ["a", "c", "b", "d", "f"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "variable_groups": [], "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{a}", "minValue": "{a}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{c}", "minValue": "{c}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{2*f}", "minValue": "{2*f}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0", "minValue": "0", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{a+b}", "minValue": "{a+b}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{2*d+2*c}", "minValue": "{2*d+2*c}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{6*f}", "minValue": "{6*f}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0", "minValue": "0", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{a+2*b+2}", "minValue": "{a+2*b+2}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{3*c+6*d}", "minValue": "{3*c+6*d}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{12*f}", "minValue": "{12*f}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0", "minValue": "0", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{a+3*b+6}", "minValue": "{a+3*b+6}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{4*c+12*d}", "minValue": "{4*c+12*d}", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "0", "minValue": "0", "showCorrectAnswer": true, "marks": 0.5}, {"correctAnswerFraction": false, "showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{a+4*b+12}", "minValue": "{a+4*b+12}", "showCorrectAnswer": true, "marks": 0.5}], "type": "gapfill", "prompt": "Using the ordered basis $\\{1,\\;x,\\;x^2,\\;x^3,\\;x^4\\}$ of $P_4$ for both range and domain, $\\phi$ is represented by a 5 x 5 matrix.\n \n Fill in the entries for this matrix below: \n\\[\\left( \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\] | \n[[0]] | \n[[1]] | \n[[2]] | \n$0$ | \n$0$ | \n\\[\\left) \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\\\end{matrix} \\right.\\] | \n
[[3]] | \n[[4]] | \n[[5]] | \n[[6]] | \n$0$ | \n||
$0$ | \n[[7]] | \n[[8]] | \n[[9]] | \n[[10]] | \n||
$0$ | \n$0$ | \n[[11]] | \n[[12]] | \n[[13]] | \n||
$0$ | \n$0$ | \n$0$ | \n[[14]] | \n[[15]] | \n
Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$ with coefficients in the real numbers.
\nLet the linear map \\[\\phi: P_4 \\rightarrow P_4 \\] be defined by:
\n\\[\\phi(p(x)) = \\simplify[all,!collectnumbers]{{a} * p(x) + ({b} * x + {c}) * p'(x) + (x ^ 2 + {d} * x + {f}) * p''(x)}\\]
\nwhere $p'(x)$ is the first derivative of $p(x)$ and $p''(x)$ the second derivative.
", "tags": ["basis", "checked2015", "linear map", "linear spaces", "MAS2223", "matrix", "matrix given by a basis", "matrix of a linear map", "poynomials", "vector spaces"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "13/02/2013:
\nAdvice to be completed.
", "licence": "Creative Commons Attribution 4.0 International", "description": "Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$ with coefficients in the real numbers.
\nLet the linear map $\\phi: P_4 \\rightarrow P_4$ be defined by:
\n$\\phi(p(x))=ap(x) + (bx + c)p'(x) + (x ^ 2 + dx + f)p''(x)$
\nUsing the standard basis for range and domain find the matrix given by $\\phi$.
"}, "advice": "We have:
\n\\[\\phi(1) =\\simplify[all,!zerofactor,!collectNumbers,!constantsfirst,!noleadingminus]{ {a} * 1 + ({b} * x + {c}) * 0 + (x ^ 2 + {d} * x + {f}) * 0 = {a} = {a} * 1 + 0 * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]
\ngives the first column of the matrix.
\n\\[\\phi(x) = \\simplify[all,!zerofactor,!collectNumbers,!constantsfirst,!noleadingminus]{{a} * x + ({b} * x + {c}) * 1 + (x ^ 2 + {d} * x + {f}) * 0 = {c} + {a + b} * x = {c} * 1 + {a + b} * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]
\ngives the second column of the matrix.
\n\\[\\phi(x ^ 2) = \\simplify[all,!zerofactor,!collectNumbers,!constantsfirst,!noleadingminus]{{a} * x ^ 2 + ({b} * x + {c}) * 2 * x + (x ^ 2 + {d} * x + {f}) * 2 = {2 * f} + {2 * d + 2 * c} * x + {a + 2 * b + 2} * x ^ 2 = {2 * f} * 1 + {2 * d + 2 * c} * x + {a + 2 * b + 2} * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]
\n\n
gives the third column of the matrix.
\nContinuing on in this way for $\\phi(x^3),\\;\\phi(x^4)$ we obtain the matrix for $\\phi$ with respect to the given bases for domain and range.
\n\\[\\begin{pmatrix}\\var{a}&\\var{c}&\\var{2*f}&0&0\\\\0&\\var{a+b}&\\var{2*d+2*c}&\\var{6*f}&0\\\\0&0&\\var{a+2*b+2}&\\var{3*c+6*d}&\\var{12*f}\\\\0&0&0&\\var{a+3*b+6}&\\var{4*c+12*d}\\\\0&0&0&0&\\var{a+4*b+12}\\end{pmatrix}\\]
"}], "pickQuestions": 0}], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Questions used in a university course titled \"Linear algebra\""}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}