// Numbas version: exam_results_page_options {"variable_groups": [], "question_groups": [{"pickingStrategy": "all-ordered", "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}, "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$.

\n

Let $a_1$ be the least eigenvalue of $A,\\;\\;\\; a_1=\\;\\;$[[0]]

\n

Let $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$.

\n

Let $(1,y_1)^T$ be an eigenvector corresponding to $a_1,\\;\\;\\;\\;y_1=\\;\\;$[[0]]

\n

Let $(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 \n

Find the eigenvalues of $B$.

\n \n \n \n

Let $b_1$ be the least eigenvalue of $B,\\;\\;\\; b_1=\\;\\;$[[0]]

\n \n \n \n

Let $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$.

\n

Let $(x_1,1)^T$ be an eigenvector corresponding to $b_1,\\;\\;\\;\\;x_1=\\;\\;$[[0]]

\n

Let $(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": "\n

Find $B^{\\var{n}}$ using the last two parts of this question:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n
 $B^{\\var{n}} = \\Bigg($ [[0]] [[1]] $\\Bigg)$ [[2]] [[3]]
\n

\n ", "showCorrectAnswer": true, "marks": 0}], "statement": "\n \n \n

Find 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 \$

\n \n \n ", "tags": ["checked2015", "diagonalising matrices.", "eigenvalues", "eigenvalues of matrix", "eigenvectors of matrix", "MAS1602", "matrices", "matrix", "matrix eigenvalues", "tested1"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

10/07/2012:

\n

\n

In the Advice section it is not explained how to find the trace and the determinant of the matrix - Should this be included?

\n

Question appears to be working correctly.

\n

24/12/2012:

\n

Checked 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

### Matrix $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}$

\n

b)

\n

#### Finding the eigenvectors:

\n

1. $\\lambda=\\var{mnA}$

\n

We 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}\$

\n

This 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).

\n

So putting $x=1$ in the first equation we get $y_1=\\var{-s*(a11-mnA)}$

\n

Hence the eigenvector we want is \$\\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mnA)} \\end{pmatrix}\$

\n

2. $\\lambda=\\var{mxA}$

\n

In 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*} \$

\n

Once again there is only one equation, so putting $x=1$ in the first equation we get $y_2=\\var{-s*(a11-mxA)}$

\n

Hence the eigenvector we want is \$\\begin{pmatrix} 1 \\\\ \\var{-s*(a11-mxA)} \\end{pmatrix}\$

\n

c)

\n

### Matrix $B$

\n

The characteristic polynomial is given by:

\n

\$p(\\lambda)=\\simplify[std]{lambda^2-{b11+b22}*lambda + {dB}}\$

\n

Solving $p(\\lambda)=0$, we find the eigenvalues for $B$ are:
\$\\lambda_1=\\var{mnB},\\;\\;\\;\\lambda_2=\\var{mxB}\$

\n

d)

\n

#### Eigenvectors

\n

1. $\\lambda=\\var{mnB}$

\n

The equations are:
\$\\begin{eqnarray*} \\simplify[std]{{b11-mnB}x + {b12}y}&=&0\\\\ \\simplify[std]{{b21}x + {b22-mnB}y}&=&0 \\end{eqnarray*} \$

\n

Putting $y=1$ in the second equation we get $x_1=\\var{s*(b22-mnB)}$

\n

Hence the eigenvector we want is \$\\begin{pmatrix} \\var{s*(b22-mnB)}\\\\1 \\end{pmatrix}\$

\n

2. $\\lambda=\\var{mxB}$

\n

The 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)}$

\n

Hence the eigenvector we want is \$\\begin{pmatrix} \\var{s*(b22-mxB)}\\\\1 \\end{pmatrix}\$

\n

e)

\n

For the last part we use the diagonalisation of $B$ given by the last two parts.

\n

Thus 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*} \$

\n

Hence \$\\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}, "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$.

\n

Find the corresponding eigenvalue: [[0]]

\n

Also $\\var{vector(1,1-b,-a)}$ is an eigenvector of $M$.

\n

Find 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$.

\n

Enter the characteristic polynomial in the form $P_M(\\lambda) = -\\lambda^3+a\\lambda^2+b\\lambda+c$.

\n

Write the letter $\\lambda$ as lambda.

\n

Characteristic polynomial: $P_M(\\lambda) = \\;$[[0]]

\n

Hence find another eigenvalue of $M$: [[1]]

\n

Find a corresponding eigenvector for this eigenvalue. Scale your vector such that the first component is $1$. You have to find the other two components:

\n

Eigenvector = $\\Bigg($ $1$[[2]][[3]] $\\Bigg)$

\n

Input 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": "

### a)

\n

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)}$.

\n

Hence the corresponding eigenvalue is $\\var{eigen1}$.

\n

Similarly, 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)}$.

\n

Hence the corresponding eigenvalue for this eigenvector is $\\var{eigen3}$.

\n

### b)

\n

The characteristic polynomial is given by $P_M(\\lambda)=\\operatorname{det}(M-\\lambda I_3)$. The roots of this are the eigenvalues.

\n

We 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}\

\n

Now we know that $\\simplify{lambda-{eigen1}}$ and  $\\simplify{lambda-{eigen3}}$ are both factors of the characteristic polynomial.

\n

Hence we have:

\n

$\\simplify{-lambda^3+{coefflamsq}*lambda^2+{coefflam}*lambda+{det}=-(lambda-{eigen1})(lambda-{eigen3})(lambda-r)}$ for some number $r$.

\n

Since 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.

\n

To 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)}$

\n

This 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}\

\n

The 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}}$.

\n

Hence 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}, "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/"}], "variable_groups": [], "variables": {"x": {"templateType": "anything", "group": "Ungrouped variables", "definition": "c3-(b*a-b)*z-b*y", "description": "", "name": "x"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "name": "c1"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "", "name": "a"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c"}, "z": {"templateType": "anything", "group": "Ungrouped variables", "definition": "c1+c2*c*(b-a*b)+c3*c*(a^2*b-a-a*b)", "description": "", "name": "z"}, "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"}, "y": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a*c3-c2-a*z", "description": "", "name": "y"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "c2"}}, "ungrouped_variables": ["a", "c", "b", "c3", "c2", "y", "x", "c1", "z"], "functions": {}, "parts": [{"showCorrectAnswer": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "\n

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

\n

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

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \$\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[1]] [[2]] [[3]] [[4]] \$\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[5]] [[6]] [[7]] [[8]] [[9]] [[10]] [[11]] [[12]]
\n ", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"displayType": "radiogroup", "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.

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

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

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

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:

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

From this you should find:

\n \n \n \n

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

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

\n \n \n \n

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

\n \n \n \n

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

\n \n \n \n

Using this you can now find $x$:

\n \n \n \n

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

\n \n \n ", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "minValue": "{y}", "maxValue": "{y}", "unitTests": [], "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "variableReplacements": [], "marks": 3, "mustBeReducedPC": 0}, {"correctAnswerFraction": false, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "minValue": "{x}", "maxValue": "{x}", "unitTests": [], "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "variableReplacements": [], "marks": 2.6, "mustBeReducedPC": 0}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "sortAnswers": false}], "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.

", "tags": ["checked2015", "columns", "Gauss", "gauss", "gauss elimination", "Gauss elimination", "gaussian elimination", "Gaussian elimination", "linear algebra", "Linear equations", "linear equations", "matrices", "matrix", "reduced matrix", "row operators", "rows", "solving a system of linear equations", "Solving equations", "solving equations"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

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

#### Part 1.

\n

Introduce zeros in the first column below the first entry by adding suitable multiples of the first row to rows 2 and 3.

\n

Input all numbers as fractions or integers and not as decimals.

\n

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \$\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ $\\var{a11}$ $\\var{a12}$ $\\var{a13}$ $1$ $0$ $0$ \$\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ $0$ [[0]] [[1]] [[2]] $1$ $0$ $0$ [[3]] [[4]] [[5]] $0$ $1$
\n

Now, if necessary, multiply the second row by a suitable number so that the second entry in the second row is 1.

#### Part 2.

\n

Now using this matrix, introduce a zero in the second column below the second entry of the second column by:

\n

Adding [[0]] times the second row to the third row to get the matrix:

\n

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \$\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ $\\var{a11}$ $\\var{a12}$ $\\var{a13}$ $1$ $0$ $0$ \$\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ $0$ $1$ [[1]] [[2]] [[3]] $0$ $0$ $0$ [[4]] [[5]] [[6]] $1$

#### Part 3.

\n

Now, if necessary, multiply the third row by a suitable constant so that the third entry in the third column is 1.

\n

With 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.

\n

Multiply third row by [[0]]and add to the second row.

\n

Multiply third row by [[1]]and add to the first row.

\n

Using this new matrix there is one more operation needed.

\n

Multiplying the second row by $\\var{-a12}$ and adding to the first row to obtain the inverse matrix appearing on the right hand side.

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \$\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ $1$ $0$ $0$ [[2]] [[3]] [[4]] \$\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ $0$ $1$ $0$ [[5]] [[6]] [[7]] $0$ $0$ $1$ [[8]] [[9]] [[10]]
\n ", "showCorrectAnswer": true, "marks": 0}], "statement": "\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)\$

\n

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)\$

\n

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\t

5/07/2012:

\n \t\t

\n \t\t

Changed grammar in the question.

\n \t\t

Question appears to be working correctly.

\n \t\t

14/07/2012:

\n \t\t

Need 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

Let

\n \n \n \n

\$A = \\left(\\begin{array}{rrr} \\var{a11} & \\var{a12} & \\var{a13}\\\\ \\var{a21} & \\var{a22} & \\var{a23}\\\\ \\var{a31} & \\var{a32} & \\var{a33}\\\\\n \n \\end{array}\\right),\\;\\;\\;\\;\n \n B= \\left(\\begin{array}{rrr} \\var{b11} & \\var{b12} & \\var{b13}\\\\ \\var{b21} & \\var{b22} & \\var{b23}\\\\ \\var{b31} & \\var{b32} & \\var{b33}\\\\\n \n \\end{array}\\right),\\;\\;\\;\\;\n \n v= \\left(\\begin{array}{r} \\var{v1}\\\\ \\var{v2} \\\\ \\var{v3} \\end{array}\\right),\\;\\;\\;\\;\n \n w= \\left(\\begin{array}{r} \\var{w1}\\\\ \\var{w2} \\\\ \\var{w3} \\end{array}\\right)\$

\n \n \n \n

Find the following products:

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \$Av=\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[0]] \$\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[1]] [[2]] \$Bw=\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[3]] \$\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[4]] [[5]]
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \$BA=\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[6]] [[7]] [[8]] \$\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[9]] [[10]] [[11]] [[12]] [[13]] [[14]]
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \$AB=\\left( \\begin{matrix} \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[15]] [[16]] [[17]] \$\\left) \\begin{matrix} \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[18]] [[19]] [[20]] [[21]] [[22]] [[23]]
\n \n \n \n ", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"layout": {"expression": ""}, "choices": ["

$CD$

", "

$DC$

", "

$EF$

", "

$FE$

", "

$BC$

", "

$AE$

", "

$GH$

", "

$HE$

", "

$AG$

", "

$GB$

"], "matrix": "v", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "answers": ["Can be calculated", "Cannot be calculated"], "scripts": {}, "minMarks": 0, "minAnswers": 0, "maxMarks": 0, "shuffleAnswers": false, "showCorrectAnswer": true, "marks": 0}], "type": "gapfill", "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}\$

\n

Which of the following products of matrices can be calculated?

\n

[[0]]

\n

Please 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.

", "showCorrectAnswer": true, "marks": 0}], "statement": "

Answer the following questions on matrices.

\n

", "tags": ["checked2015", "linear algebra", "mas104220122013CBA4_2", "MAS1602", "MAS2223", "matrices", "matrix", "matrix manipulation", "matrix multiplication", "multiply matrix", "products of matrices"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t \t\t

5/07/2012:

\n \t\t \t\t

\n \t\t \t\t

Question appears to be working correctly.

\n \t\t \t\t

\n \t\t \n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Elementary Exercises in multiplying matrices.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": ""}, {"name": "Solve simultaneous equations by finding inverse matrix, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"mb": {"group": "Ungrouped variables", "templateType": "anything", "definition": "matrix([\n [random(-9..9 except 0)],\n [random(-9..9 except 0)]\n])", "description": "", "name": "mb"}, "x": {"group": "Ungrouped variables", "templateType": "anything", "definition": "(ma_inverse*mb)[0][0]", "description": "", "name": "x"}, "ma": {"group": "Ungrouped variables", "templateType": "anything", "definition": "matrix([\n [a00,a01],\n [a10,a11]\n])", "description": "

Matrix A. a10 is picked so it's non-singular, and a11 is never $\\pm a01$.

\n

No entry is 0.

$\\mathbf{A} =$ [[0]]

\n
$\\mathbf{v} =$ \n
\n
\n \n \n \n \n \n \n \n \n \n \n
 [[1]] [[2]]
\n \n
\n
\n

$\\mathbf{b} =$ [[3]]

", "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": true, "correctAnswer": "ma_inverse", "showCorrectAnswer": true, "allowResize": false, "correctAnswerFractions": true, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": "2", "tolerance": 0, "markPerCell": false, "marks": "2"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

Find the inverse of $\\mathbf{A}$.

\n

$\\mathbf{A}^{-1} =$ [[0]]

", "marks": 0}, {"scripts": {}, "gaps": [{"allowFractions": true, "correctAnswer": "ma_inverse*mb", "showCorrectAnswer": true, "allowResize": false, "correctAnswerFractions": true, "numRows": "2", "scripts": {}, "type": "matrix", "numColumns": 1, "tolerance": 0, "markPerCell": false, "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

Now find $\\mathbf{A}^{-1}\\mathbf{b}$.

\n

$\\mathbf{A}^{-1}\\mathbf{b} =$ [[0]]

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

Finally, solve the equations.

\n

$x =$ [[0]]

\n

$y =$ [[1]]

", "marks": 0}], "statement": "

Rewrite the following system of equations as a matrix equation

\n

\$\\mathbf{Av} = \\mathbf{b} \$

\n

for 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}

\n

Input all numbers as fractions or integers and not as decimals.

", "tags": ["checked2015", "inverse of a matrix", "linear equations", "linear equations in matrix form", "MAS1602", "MAS2223", "matrices", "matrix", "matrix equations", "matrix form", "matrix multiplication", "multiply matrices", "multiply matrix", "solving linear equations", "system of linear equations", "tested1"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

20/06/2012:

\n

\n

Edited advice so that it gave the correct solution for $y$ (as in the answer).

\n

4/07/2012:

\n

Column vectors v and b have the bracket in the incorrect place.

\n

\n

10/07/2012:

\n

\n

Question appears to be working correctly.

\n

Column vectors v and b still have brackets in incorrect places.

\n

24/12/2012:

\n

Checked calculations, OK. Added tested1 tag.

\n

Improved display as requested above.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Putting a pair of linear equations into matrix notation and then solving by finding the inverse of the coefficient matrix.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

#### a)

\n

The equations can be written in the matrix form

\n

\$\\var{ma}\\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\var{mb} \$

\n

#### b)

\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}} \$

\n

#### c)

\n

We have

\n

\\begin{align}
\\mathbf{A}^{-1}\\mathbf{b} &= \\simplify[fractionnumbers]{{ma_inverse}*{mb}} \\\\
&= \\simplify[fractionnumbers]{{ma_inverse*mb}}
\\end{align}

\n

#### d)

\n

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}

\n

Hence,

\n

\$\\begin{pmatrix} x \\\\ y \\end{pmatrix} = \\simplify[fractionnumbers]{{ma_inverse*mb}} \$

\n

That is,

\n

\\begin{align}
x &= \\simplify[fractionnumbers]{{x}}, \\\\ \\\\
y &= \\simplify[fractionnumbers]{{y}}
\\end{align}

"}, {"name": "Combine linearly dependent vectors to get zero", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": 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]]

\n

Input 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}\

\n

You are asked to show that the vectors $\\textbf{v}_1,\\;\\textbf{v}_2,\\;\\textbf{v}_3,\\;\\textbf{v}_4$ are linearly dependent.

\n

Find 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:

\n

Finished first draft. Need to resolve the display of row vectors etc.

\n

Display 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\$

\n

Hence 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}\

\n

On 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}\

\n

On 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}, "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}\

\n

Observe: 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.

\n

Here, 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:

\n

First draft finished.

\n

06/11/2013:

\n

Got 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.

\n

2. 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.

\n

Given 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.

\n

However if two can be so expressed then there are only $3$ independent vectors and so cannot be spanning.

\n

We 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}, "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].

\n

tt[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]]

\n

2. 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?

\n

If you cannot find such an expression, input 0 for both $p$ and $q$.

\n

$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:

\n

Finished first draft. Need to resolve the display of row vectors etc.

\n

Display 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": "

#### a)

\n

1. These vectors cannot form a spanning set as you need at least 4 vectors to form a spanning set in $\\mathbb{R^4}$.

\n

2. $\\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$.

\n

If 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.

\n

On 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}\

\n

We 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}\$

\n

It follows that $\\{\\mathbf{v}_1, \\; \\mathbf{v}_2 , \\; \\mathbf{v}_3\\}$ is a linearly {independent} set of vectors.

\n

#### b)

\n

Because 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}$.

\n

"}, {"name": "Find a basis given a spanning set of vectors", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"mm2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch(u>3,[0.5,0],[0,0.5])", "description": "", "name": "mm2"}, "ont4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm4[1]=1,\"\", \"not\")", "description": "", "name": "ont4"}, "mm6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u=3 or u=6 or u=8 or u=9,[0,1], [1,0])", "description": "", "name": "mm6"}, "v1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "x", "description": "", "name": "v1"}, "ga": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(al*be=0, random(1,-1),0)", "description": "", "name": "ga"}, "nt6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm6[0]=1,\"\", \"not\")", "description": "", "name": "nt6"}, "ont6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm6[1]=1,\"\", \"not\")", "description": "", "name": "ont6"}, "ep": {"group": "Ungrouped variables", "templateType": "anything", "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": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0,1,-1)", "description": "", "name": "be"}, "v": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[-b+c,a-c,-a+b,a-b+c] ", "description": "", "name": "v"}, "nt5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm5[0]=1,\"\", \"not\")", "description": "", "name": "nt5"}, "nt2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm2[0]=0.5,\"\", \"not\")", "description": "", "name": "nt2"}, "ont2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm2[1]=0.5,\"\", \"not\")", "description": "", "name": "ont2"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..3 except 0)", "description": "", "name": "b"}, "message5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u=2 or u=5 or u=7, \"There are three linearly independent vectors at this stage and you know that the set is spanning, so the 6th vector must be in the basis.\",if(u=3 or u=6 or u=8, \"There are now 4 linearly independent vectors, so the 6th vector is not in the basis.\",\" \"))", "description": "", "name": "message5"}, "be1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(0,1,-1)", "description": "", "name": "be1"}, "p2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "\n 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 [random(0..2),random(-1,3),random(0..2),random(0..2)]))\n ", "description": "", "name": "p2"}, "r": {"group": "Ungrouped variables", "templateType": "anything", "definition": "list(al*vector(x)+be*vector(y)+ga*vector(z))", "description": "", "name": "r"}, "mm4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u=2 or u=3 or u=5 or u=6 or u=9,[1,0], [0,1])", "description": "", "name": "mm4"}, "al1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "description": "", "name": "al1"}, "u": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "description": "", "name": "u"}, "v3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u>6,z,if(u>3,p1,y))", "description": "", "name": "v3"}, "x": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[-a+b-c,-b+c,a-c,-a+b]", "description": "", "name": "x"}, "q": {"group": "Ungrouped variables", "templateType": "anything", "definition": "list(al*vector(x)+be*vector(y))", "description": "", "name": "q"}, "nt4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm4[0]=1,\"\", \"not\")", "description": "", "name": "nt4"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..3 except 0)", "description": "", "name": "a"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(c5+a+b=0, if(c5+1=0,c5+2,c5+1),c5)", "description": "", "name": "c"}, "z": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[-b-c,a+c,-a+b-c,a-b]", "description": "", "name": "z"}, "ont5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm5[1]=1,\"\", \"not\")", "description": "", "name": "ont5"}, "t": {"group": "Ungrouped variables", "templateType": "anything", "definition": "list(ep*vector(v))", "description": "", "name": "t"}, "ga1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(al1*be1=0,random(1,-1),0)", "description": "", "name": "ga1"}, "mm3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u=4 or u=5 or u=6,[0,1], [1,0])", "description": "", "name": "mm3"}, "v6": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u>7 or u=3 or u=6, p2, v)", "description": "", "name": "v6"}, "v2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u>3,y,p1)", "description": "", "name": "v2"}, "mm5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u=2 or u=5 or u=7 or u=9,[0,1], [1,0])", "description": "", "name": "mm5"}, "mm": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[[0.5,0],mm2,mm3,mm4,mm5,mm6]", "description": "", "name": "mm"}, "c5": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..3 except 0)", "description": "", "name": "c5"}, "nt3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm3[0]=1,\"\", \"not\")", "description": "", "name": "nt3"}, "al": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,-1)", "description": "", "name": "al"}, "tmm": {"group": "Ungrouped variables", "templateType": "anything", "definition": "list(transpose(matrix(mm)))", "description": "", "name": "tmm"}, "v4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u=7 or u=8,p1,if(u=9,v,if(u=4 or u=1,p2,z)))", "description": "", "name": "v4"}, "message4": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u=1 or u=4, \"Since at this stage there are only 2 linearly independent vectors and you know that the set is spanning, you can immediately say yes to the next two as they must be in the basis.\",if(u=9,\"There are now 4 linearly independent vectors and so you can answer no to the next two.\",\" \"))", "description": "", "name": "message4"}, "ont3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(mm3[1]=1,\"\", \"not\")", "description": "", "name": "ont3"}, "v5": {"group": "Ungrouped variables", "templateType": "anything", "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"}, "p1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(u<4,list(al*vector(x)),if(u<7,q,if(u<9,r,t)))", "description": "", "name": "p1"}, "y": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[b-c,a-b+c,-a-c,a+b]", "description": "", "name": "y"}}, "ungrouped_variables": ["mm5", "mm4", "nt3", "mm6", "nt5", "al", "ga1", "mm2", "ga", "ep", "ont3", "ont2", "ont6", "ont5", "ont4", "message5", "message4", "be1", "tmm", "be", "nt2", "nt4", "v1", "v2", "v3", "v4", "mm3", "v6", "nt6", "b", "c5", "al1", "a", "c", "p1", "mm", "q", "p2", "r", "u", "t", "v", "y", "x", "z", "v5"], "functions": {}, "parts": [{"variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "gaps": [{"displayType": "radiogroup", "layout": {"type": "all", "expression": ""}, "marks": 0, "choices": ["$\\textbf{v}_1$", "$\\textbf{v}_2$", "$\\textbf{v}_3$", "$\\textbf{v}_4$", "$\\textbf{v}_5$", "$\\textbf{v}_6$"], "showCorrectAnswer": true, "matrix": "mm", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": false, "warningType": "none", "scripts": {}, "maxMarks": 0, "minAnswers": 0, "minMarks": 0, "shuffleAnswers": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "answers": ["Yes", "No"], "showFeedbackIcon": true}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

Your task is to find a basis for $\\mathbb{R^4}$ by finding a linearly independent subset of these vectors.

\n

Start from $\\textbf{v}_1$ and work through each vector in turn.

\n

Determine if a vector is a linear combination of the previous vectors in the list.

\n

If it is not such a linear combination then include it in the basis by choosing Yes, otherwise choose No.

\n

Note 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$.

\n

When 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}\

\n

You 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.

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}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"w": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,random(-9..9 except 0))", "description": "", "name": "w"}, "g15": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=2 or t=4,random(-9..9),0)", "description": "", "name": "g15"}, "u2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,random(1..9))", "description": "", "name": "u2"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[[0,0,0.6],[mb1,mb2,mb3],[0,0,0.6],[0,0.6,0],[mf1,mf2,0]]", "description": "", "name": "v"}, "a": {"templateType": "anything", "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": "", "name": "a"}, "c": {"templateType": "anything", "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": "", "name": "c"}, "c13": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(b23=1,w,random(-9..9))", "description": "", "name": "c13"}, "g23": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=2 or t=3, random(-9..9),if(t=4 or t=5,1,0))", "description": "", "name": "g23"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..6)", "description": "", "name": "t"}, "mb3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.6-mb1-mb2", "description": "", "name": "mb3"}, "mf2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "0.6-mf1", "description": "", "name": "mf2"}, "g33": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=1,1,0)", "description": "", "name": "g33"}, "g35": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=3 or t=5 or t=6,1,if(t=1,0,random(-9..9)))", "description": "", "name": "g35"}, "mb2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c12=1 and w=0,0.6,0)", "description": "", "name": "mb2"}, "mf1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if((u1=0)AND (u2=0),0,0.6)", "description": "", "name": "mf1"}, "b23": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c12=1,1,random(1..4))", "description": "", "name": "b23"}, "u1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,random(-4..4 except 0))", "description": "", "name": "u1"}, "b": {"templateType": "anything", "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": "", "name": "b"}, "g14": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=1 or t=3 or t=5,random(-9..9),0)", "description": "", "name": "g14"}, "g12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t<4,0,random(-9..9))", "description": "", "name": "g12"}, "g22": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t<4,1,0)", "description": "", "name": "g22"}, "g13": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=2 or t=3 or t=6,random(-9..9),0)", "description": "", "name": "g13"}, "d": {"templateType": "anything", "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": "", "name": "d"}, "f": {"templateType": "anything", "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": "", "name": "f"}, "mb1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(c12=1, if(w=0,0,0.6),0)", "description": "", "name": "mb1"}, "g24": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=1 or t=3 or t=5,random(-9..9),if(t=6,1,0))", "description": "", "name": "g24"}, "c12": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,random(-9..9 except 1))", "description": "", "name": "c12"}, "g25": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=2 or t=4,random(-9..9),0)", "description": "", "name": "g25"}, "g36": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=1,random(-9..9),0)", "description": "", "name": "g36"}, "g16": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=1,random(-9..9),0)", "description": "", "name": "g16"}, "g46": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=1,random(-9..9),1)", "description": "", "name": "g46"}, "g26": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=1,random(-9..9),0)", "description": "", "name": "g26"}, "g45": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=1,1,0)", "description": "", "name": "g45"}, "g34": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(t=3 or t=5 or t=6,0,if(t=1,random(-9..9),1))", "description": "", "name": "g34"}}, "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"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"displayType": "radiogroup", "minMarks": 0, "layout": {"type": "all", "expression": ""}, "choices": ["$\\var{a}$", "$\\var{b}$", "$\\var{c}$", "$\\var{d}$", "$\\var{f}$"], "matrix": "v", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": true, "warningType": "none", "scripts": {}, "marks": 0, "minAnswers": 0, "maxMarks": 0, "shuffleAnswers": false, "showCorrectAnswer": true, "answers": ["In row echelon form but not reduced", "In reduced row echelon form", "Neither"]}], "statement": "\n

Echelon Forms

\n

For each of the following matrices choose which are:

\n

a) In row echelon form but not in reduced row echelon form.

\n

b) In reduced row echelon form.

\n

c) Neither a) nor b).

\n ", "tags": ["checked2015", "echelon form", "linear algebra", "MAS2223", "matrices", "matrixx", "MCQ", "reduced echelon form", "row reduced"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t

9/2/2013:

\n \t\t

Finished first draft. Needs tidying up - especially the variables! Needs a more systematic approach to generating the matrices.

\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Choose which of 5 matrices are in a) row echelon form but not reduced b) reduced row echelon form c) neither.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

Look at your notes for the definition of echelon form.

"}, {"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}, "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 = $('');\nvar n=matrix_list.length;\nvar m='';\nvar mess='';\nfor(var i=0;i');\ntable.append('');\ntable.append(''); \n}\nreturn table;\n", "parameters": [["matrix_list", "list"], ["message_list", "list"]]}, "colmar": {"type": "list", "language": "javascript", "definition": "var ar=z;\nfor (var i=0;i<3;i++) {\n ar[ef[i]-1]=1;\n}\nreturn ar;", "parameters": [["z", "list"], ["ef", "list"]]}, "rref1": {"type": "list", "language": "javascript", "definition": "function finish() {\n for(var i=0;i=ind?temp.push(getRandomInt(1,max)):temp.push(0);\n }\n for(var k=0;k=b,0,c)", "parameters": [["a", "number"], ["b", "number"], ["c", "number"]]}, "rdmat": {"type": "list", "language": "javascript", "definition": "function getRandomInt(min, max) {\nreturn Math.floor(Math.random() * (max - min + 1)) + min;\n};\nvar m=[];\nvar temp;\nfor(var i=0;iRank of$A=\\;$[[0]] \n Nullity of$A=\\;$[[1]] ", "variableReplacements": [], "marks": 0}, {"variableReplacementStrategy": "originalfirst", "scripts": {}, "gaps": [{"displayType": "checkbox", "choices": [" Row 1 ", " Row 2 ", " Row 3 ", " Row 4 ", " Row 5 ", " Row 6 "], "showCorrectAnswer": true, "matrix": ["0.3", "0.3", "0.4", 0, 0, 0], "distractors": ["", "", "", "", "", ""], "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": false, "warningType": "none", "scripts": {}, "minMarks": 0, "type": "m_n_2", "maxMarks": "1", "displayColumns": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "type": "gapfill", "showCorrectAnswer": true, "prompt": " Determine a basis of$\\operatorname{row}(A)$consisting of rows of$R$by clicking on the appropriate choices of rows of$R$. \n [[0]] ", "variableReplacements": [], "marks": 0}, {"displayType": "checkbox", "choices": [" Column 1 ", " Column 2 ", " Column 3 ", " Column 4 ", " Column 5 "], "variableReplacementStrategy": "originalfirst", "matrix": "colmark", "prompt": " \n Click on the choices of columns of$A$which form a basis for the column space. \n\n Note that there are more than one possible choice of columns and if the columns you choose form a basis then this will be marked as correct. If you Reveal the answer you will see one possible such choice. \n ", "minAnswers": 0, "maxAnswers": 0, "shuffleChoices": false, "warningType": "none", "scripts": {"mark": {"script": "var trm=variables.trtestmatrix;\nvar echform=variables.echform;\nvar rank=variables.rank;\nvar trm=Numbas.util.copyarray(trm,true);\nthis.answered=true;\n\n\nvar tm=[];\nvar selected=[];\nvar not_selected=[];\nvar numTicks = 0;\nfor( var i=0;i<5;i++) {\n if(this.ticks[i][0]) {\n numTicks += 1;\n tm.push(trm[i]);\n selected.push(i+1);\n }\n else {not_selected.push(i+1);}\n}\n\nvar rank1 = question.functions.ref(tm);\nvar diff = false;\nvar explain = this.question.display.html.find('#explain');\nvar note = '';\nvar mess = '';\nfor(var i=0;i<3;i++) { \n if(echform[i]!=selected[i]) {\n diff=true;\n }\n}\nif(diff) {\n mess='You have chosen correctly, but the easiest choice to make is those columns which have pivots, in this case columns '+echform[0]+', '+echform[1]+', '+echform[2]+'. ';\n}\nif(numTicksrank) {\n this.setCredit(0, 'You have included too many columns, the rank is less than '+numTicks+'.');\n} else if(rank1==rank) {\n if(diff) {\n mess='You have chosen correctly, but the easiest choice to make is those columns which have pivots, in this case columns '+echform[0]+', '+echform[1]+', '+echform[2]+'. ';\n } else { \n mess='';\n }\n this.setCredit(1,mess);\n if(diff){ \n note='Click on the Show feedback button for more information on your choices.';\n } else {\n note='';\n }\n explain.text(note);\n} else {\n this.setCredit(0,'These columns are not linearly independent.');\n}\n\n\nthis.validation.numTicks = numTicks;", "order": "instead"}}, "minMarks": 0, "type": "m_n_2", "maxMarks": "1", "displayColumns": 0, "showCorrectAnswer": true, "variableReplacements": [], "marks": 0}, {"variableReplacementStrategy": "originalfirst", "scripts": {}, "gaps": [{"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "c0[0]", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "c0[0]"}, {"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "c0[1]", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "c0[1]"}, {"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "c0[2]", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "c0[2]"}, {"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "c1[0]", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "c1[0]"}, {"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "c1[1]", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "c1[1]"}, {"correctAnswerFraction": false, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "c1[2]", "showCorrectAnswer": true, "variableReplacements": [], "marks": "0.5", "maxValue": "c1[2]"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": " Express the following columns in terms of the columns$c_\\var{echform[0]}$,$c_\\var{echform[1]}$,$c_\\var{echform[2]}$\n$c_{\\var{othercols[0]}}$=[[0]]$c_\\var{echform[0]}$+[[1]]$c_{\\var{echform[1]}}$+[[2]]$c_{\\var{echform[2]}}$\n$c_{\\var{othercols[1]}}$=[[3]]$c_\\var{echform[0]}$+[[4]]$c_{\\var{echform[1]}}$+[[5]]$c_{\\var{echform[2]}}$", "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "markPerCell": false, "allowFractions": false, "correctAnswer": "transpose(matrix(null_basis))", "allowResize": true, "prompt": " Determine a basis for$\\operatorname{Null}(A)$. \n Enter the basis elements as the columns of a matrix: \n Note that any such basis will be marked as correct. If you Reveal the answer you will see one possible such basis. \n ", "correctAnswerFractions": false, "numRows": "5", "scripts": {"mark": {"script": "var nullity=variables.nullity;\nvar columns=variables.columns;\nvar rows=variables.rows;\nvar testmatrix=variables.testmatrix;\nvar ans=this.studentAnswer;\nvar ans_rows=this.studentAnswerRows;\nthis.answered=true;\n\nif(ans_rows!=columns){\n this.setCredit(0,'These vectors are not of the correct dimension.')\n return;\n}\nvar ans_cols=this.studentAnswerColumns;\nif(ans_cols!=nullity){\n this.setCredit(0,'Not the correct number of vectors.')\n return;\n}\nvar dim_null_space_ans=question.functions.ref(ans);\nif(dim_null_space_ans!=nullity){\n this.setCredit(0, 'These vectors are not linearly independent.');\n return;\n}\nfunction check_in_kernel(m1,m2) {\n var d = 0;\n for(var i=0;i0\nand\nmax(map(testing(record[0][x]),x,0..length(record[0])-1))=0", "maxRuns": "200"}, "statement": " The row-reduced echelon form$R$of the following matrix$A$\n$A=\\var{testmatrix}$is given by$R=\\var{echmatrix}$. \n ", "tags": ["bases", "basis", "column space", "dimension", "echelon form", "linear algebra", "linear independence", "linearly dependent", "matrices", "matrix type", "null space", "nullity", "rank", "row operations", "row reduced", "row space", "row-reduced"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": "question.functions={};\nquestion.functions.ref=function(m){\n \n m = util.copyarray(m,true);\n \n function finish() {\n\n return rank;\n }\n\n\n\n var lead = 0;\n var rank = 0;\n var echelon=[];\n var rows = m.length;\n for(var i=0;iFix rank to be 3. ", "licence": "Creative Commons Attribution 4.0 International", "description": " Given a matrix in row reduced form use this to find bases for the null, column and row spaces of the matrix. "}, "advice": " a) The following shows how$A$is reduced to row-echelon form. \n \n {solution(record_ops_matrix,record_ops_message)} \n The rank of A is the number of columns of R with pivots, i.e. 3. \n The nullity of A is the number of columns of R without pivots, i.e. 2. \n b) Given the row-echelon form we see that the first three rows of$R$form a basis for the row space of$A$. \n c) One basis for the column-space of$A$is given by the original columns which in the row-reduced echelon form have a pivot. \n For example,$\\{c_i:i \\in \\var{set(echform)}\\}$\n$\\var{column_basis}$\n There are other bases which you could have chosen and would also have been marked as correct. \n d) If you look at the columns$c_{\\var{othercols[0]}}$and$c_{\\var{othercols[1]}}$we can simply read off these columns as combinations of the other columns by looking at the numbers above the pivot element in each of the columns$c_{\\var{othercols[0]}}$and$c_{\\var{othercols[1]}}$. \n e) Basis for the null-space. \n The dimension of the null-space is$2$and so we should have$2$vectors in the basis. \n The null space is given by$\\operatorname{Null}(A)=\\operatorname{Null}(R)= \$\\left\\{(x_1,x_2,x_3,x_4,x_5):\\simplify{{ec}*vector(x_1,x_2,x_3,x_4,x_5)=vector(0,0,0,0,0,0)}\\right\\}\$ \n This gives three equations: \n \\begin{align}\\simplify{{ec[0][0]}x_1+{ec[0][1]}x_2+{ec[0][2]}x_3+{ec[0][3]}x_4+{ec[0][4]}x_5}&=0\\\\\\simplify{{ec[1][0]}x_1+{ec[1][1]}x_2+{ec[1][2]}x_3+{ec[1][3]}x_4+{ec[1][4]}x_5}&=0\\\\\\simplify{{ec[2][0]}x_1+{ec[2][1]}x_2+{ec[2][2]}x_3+{ec[2][3]}x_4+{ec[2][4]}x_5}&=0 \\end{align} \n The free columns (without a pivot element) arec_{\\var{nbasis_column[0]}},c_{\\var{nbasis_column[1]}}$\n We obtain$2$vectors which are linearly independent by: \n 1) Setting:$x_{\\var{nbasis_column[0]}}=1,x_{\\var{nbasis_column[1]}}=0$gives$\\var{rowvector(null_basis[0])}$as a basis element for the null-space. \n 2) Setting:$x_{\\var{nbasis_column[0]}}=0,x_{\\var{nbasis_column[1]}}=1$gives$\\var{rowvector(null_basis[1])}$as another basis element for the null-space. \n Hence$\\{\\var{rowvector(null_basis[0])},\\var{rowvector(null_basis[1])}\\}$\n is a basis for the null-space. \n Note that this is just one possible basis, and if you input another correct basis for the null-space then it will be marked as correct. \n Alternatively. \n Note that on using the equations above, the variables$x_{\\var{echform[0]}},\\;x_{\\var{echform[1]}}$and$x_{\\var{echform[2]}}$can be expressed in terms of the variables$x_{\\var{nbasis_column[0]}},x_{\\var{nbasis_column[1]}}$. \n If we do so we find that: \n$ (x_1,x_2,x_3,x_4,x_5) \\in \\operatorname{Null}(A) \\iff$\$(x_1,x_2,x_3,x_4,x_5)= x_{\\var{nbasis_column[0]}}\\var{rowvector(null_basis[0])}+x_{\\var{nbasis_column[1]}}\\var{rowvector(null_basis[1])}.\$ \n As$ x_{\\var{nbasis_column[0]}},\\;x_{\\var{nbasis_column[1]}}$can take any values we see that the vectors \n$\\{\\var{rowvector(null_basis[0])},\\var{rowvector(null_basis[1])}\\}$form a basis as they span$\\operatorname{Null}(A)$and there are$2$vectors which agrees with the nullity. \n \n "}, {"name": "Row reducing a matrix and finding its rank and nullity-MA2223", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"column_basis": {"templateType": "anything", "group": "Ungrouped variables", "definition": "set(map(trtestmatrix[x],x,echelonform[1]))", "description": "", "name": "column_basis"}, "maxint": {"templateType": "anything", "group": "Ungrouped variables", "definition": "4", "description": "", "name": "maxint"}, "echmatrix": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix(ech)", "description": "", "name": "echmatrix"}, "deter": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rref(rdmat,0)[3]", "description": "", "name": "deter"}, "record": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rref(list(testmatrix),0)", "description": "", "name": "record"}, "echelonform": {"templateType": "anything", "group": "Ungrouped variables", "definition": "echelon_form_matrix(rows,rank,columns,maxint)", "description": "", "name": "echelonform"}, "nullity": {"templateType": "anything", "group": "Ungrouped variables", "definition": "5-rank", "description": "", "name": "nullity"}, "ech": {"templateType": "anything", "group": "Ungrouped variables", "definition": "echelonform[0]", "description": "", "name": "ech"}, "null_basis": {"templateType": "anything", "group": "Ungrouped variables", "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"}, "trtestmatrix": {"templateType": "anything", "group": "Ungrouped variables", "definition": "transpose(testmatrix)", "description": "", "name": "trtestmatrix"}, "columns": {"templateType": "anything", "group": "Ungrouped variables", "definition": "5", "description": "", "name": "columns"}, "testmatrix": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix(rdmat)*matrix(ech)", "description": "", "name": "testmatrix"}, "sum": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(echform)", "description": "", "name": "sum"}, "record_ops_matrix": {"templateType": "anything", "group": "Ungrouped variables", "definition": "record[0]", "description": "", "name": "record_ops_matrix"}, "rows": {"templateType": "anything", "group": "Ungrouped variables", "definition": "6", "description": "", "name": "rows"}, "rank": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2,3,4)\n", "description": "", "name": "rank"}, "rref1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rref1(list(testmatrix))[0]", "description": "", "name": "rref1"}, "chosen": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[true,true,false,true,false]", "description": "", "name": "chosen"}, "steps": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rref(list(testmatrix),0)[2]", "description": "", "name": "steps"}, "rdmat": {"templateType": "anything", "group": "Ungrouped variables", "definition": "rdmat(rows)", "description": "", "name": "rdmat"}, "echform": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(x+1,x,echelonform[1])", "description": "", "name": "echform"}, "student_cols_matrix": {"templateType": "anything", "group": "Ungrouped variables", "definition": "transpose(matrix(map(transpose(echmatrix)[n],n,filter(chosen[j],j,0..4))))", "description": "", "name": "student_cols_matrix"}, "record_ops_message": {"templateType": "anything", "group": "Ungrouped variables", "definition": "record[1]", "description": "", "name": "record_ops_message"}, "not_chosen_col": {"templateType": "anything", "group": "Ungrouped variables", "definition": "transpose(matrix(map(transpose(echmatrix)[n],n,filter(!chosen[j],j,0..4)))[0])", "description": "", "name": "not_chosen_col"}, "ec": {"templateType": "anything", "group": "Ungrouped variables", "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", "rows", "columns", "column_basis", "sum", "null_basis", "ec", "chosen", "student_cols_matrix", "not_chosen_col"], "rulesets": {}, "showQuestionGroupNames": false, "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+' '+m+'
');\nvar n=matrix_list.length;\nvar m='';\nvar mess='';\nfor(var i=0;i');\ntable.append('');\ntable.append(''); \n}\nreturn table;\n", "parameters": [["matrix_list", "list"], ["message_list", "list"]]}, "rref1": {"type": "list", "language": "javascript", "definition": "function finish() {\n for(var i=0;i=ind?temp.push(getRandomInt(1,max)):temp.push(0);\n }\n for(var k=0;k

\n

$R=$[[0]]

\n

All entries in the matrix must be input as fractions or integers and not as decimals.

\n

\n

\n

$\\operatorname{Rank}(A)=$[[0]]

\n

$\\operatorname{Nullity}(A)=$[[1]]

\n

$\\operatorname{dim}(\\operatorname{col}(A))=$[[2]]

\n

$\\operatorname{dim}(\\operatorname{row}(A))=$[[3]]

\n

$\\operatorname{dim}(\\operatorname{null}(A))=$[[4]]

\n

", "variableReplacements": [], "marks": 0}], "statement": "

Find the row-reduced echelon form $R$ of the following matrix $A$.

\n

$A=\\var{testmatrix}$

\n

\n

", "tags": ["bases", "basis", "column space", "dimension", "echelon form", "linear algebra", "linear independence", "linearly dependent", "matrices", "matrix type", "null space", "nullity", "rank", "row operations", "row reduced", "row space", "row-reduced"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": "question.functions={};\nquestion.functions.ref=function(m){\n \n m = util.copyarray(m,true);\n \n function finish() {\n\n return rank;\n }\n\n\n\n var lead = 0;\n var rank = 0;\n var echelon=[];\n var rows = m.length;\n for(var i=0;iRank can be 2,3 or 4

", "licence": "Creative Commons Attribution 4.0 International", "description": "

Reduce a 5x6 matrix to row reduced form and using this find rank and nullity.

"}, "variablesTest": {"condition": "deter<>0\nand\nmax(map(testing(record[0][x]),x,0..length(record[0])-1))=0", "maxRuns": "200"}, "advice": "

a) The following shows how $A$ is reduced to row-echelon form.

\n

\n

{solution(record_ops_matrix,record_ops_message)}

\n

b)

\n

The rank of A is the number of columns of R with pivots, i.e. $\\var{rank}$.

\n

The nullity of A is the number of columns of R without pivots, i.e. $5-\\var{rank}=\\var{5-rank}$.

\n

Remember that the Rank-Nullity Theorem says that the number of columns of A equals the rank of A plus the nullity of A, i.e. $5=\\var{rank}+\\var{nullity}$.

\n

Also the dimensions of the row space and the column space are both equal to the rank.

\n

Finally, the dimension of the null space is the nullity.

\n

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. Fill in the entries for this matrix below:

\n
 '+mess+' '+m+'
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \$\\left( \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[0]] [[1]] [[2]] [[3]] [[4]] \$\\left) \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\\\end{matrix} \\right.\$ $0$ [[5]] [[6]] [[7]] [[8]] $0$ $0$ [[9]] [[10]] [[11]] $0$ $0$ $0$ [[12]] [[13]] $0$ $0$ $0$ $0$ [[14]]
", "showCorrectAnswer": true, "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$  with coefficients in the real numbers.

\n

Let the linear map $\\phi: P_4 \\rightarrow P_4$ be defined by:

\n

\$\\phi(p(x))=p(\\var{a})+p(\\simplify{{b}x+{c}})\$

\n

This 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)$.

\n

For 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}$.

\n

Using 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:

\n

First 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$.

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}\$

\n

gives 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}\$

\n

gives 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.

\n

Continuing 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}, "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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \$\\left( \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\$ [[0]] [[1]] [[2]] $0$ $0$ \$\\left) \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\\\end{matrix} \\right.\$ [[3]] [[4]] [[5]] [[6]] $0$ $0$ [[7]] [[8]] [[9]] [[10]] $0$ $0$ [[11]] [[12]] [[13]] $0$ $0$ $0$ [[14]] [[15]]
", "showCorrectAnswer": true, "marks": 0}], "statement": "

Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$  with coefficients in the real numbers.

\n

Let 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)}\$

\n

where  $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:

\n

", "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.

\n

Let 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)$

\n

Using the standard basis for range and domain find the matrix given by $\\phi$.

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}\$

\n

gives 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}\$

\n

gives 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.

\n

Continuing 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}\$

"}], "name": "", "pickQuestions": 0}], "name": "Linear algebra", "showQuestionGroupNames": false, "type": "question", "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/"}], "extensions": ["stats"], "custom_part_types": [], "resources": []}