// Numbas version: exam_results_page_options {"name": "Simon's copy of Find eigenvalues and eigenvectors of matrices, and power of one matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Simon's copy of Find eigenvalues and eigenvectors of matrices, and power of one matrix", "variablesTest": {"maxRuns": 100, "condition": ""}, "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"], "statement": "
Find the eigenvalues and eigenvectors for the matrix $B$ where:
\\[ B=\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22} \\end{pmatrix} \\]
Find the eigenvalues of $B$.
\n \n \n \nLet $b_1$ be the least eigenvalue of $B,\\;\\;\\; b_1=\\;\\;$[[0]]
\n \n \n \nLet $b_2$ be the greatest eigenvalue of $B,\\;\\; b_2=\\;\\;$[[1]]
\n \n \n ", "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "sortAnswers": false, "marks": 0, "unitTests": [], "gaps": [{"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{mnB}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{mnB}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 1, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{mxB}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{mxB}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 1, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}], "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "gapfill", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "prompt": "Find eigenvectors for $B$.
\nLet $(x_1,1)^T$ be an eigenvector corresponding to $b_1,\\;\\;\\;\\;x_1=\\;\\;$[[0]]
\nLet $(x_2,1)^T$ be an eigenvector corresponding to $b_2,\\;\\;\\;\\;x_2=\\;\\;$[[1]]
", "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "sortAnswers": false, "marks": 0, "unitTests": [], "gaps": [{"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{x1}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{x1}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 1, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{x2}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{x2}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 1, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}], "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "gapfill", "variableReplacementStrategy": "originalfirst", "useCustomName": false, "prompt": "\nFind $B^{\\var{n}}$ using the last two parts of this question:
\n$B^{\\var{n}} = \\Bigg($ | \n[[0]] | \n[[1]] | \n$\\Bigg)$ | \n
[[2]] | \n[[3]] | \n
Input your answers as integers.
\n ", "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "sortAnswers": false, "marks": 0, "unitTests": [], "gaps": [{"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{bn11}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{bn11}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 1, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{bn12}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{bn12}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 1, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{bn21}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{bn21}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 1, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}, {"type": "numberentry", "variableReplacementStrategy": "originalfirst", "maxValue": "{bn22}", "useCustomName": false, "showFractionHint": true, "extendBaseMarkingAlgorithm": true, "customName": "", "customMarkingAlgorithm": "", "allowFractions": false, "minValue": "{bn22}", "mustBeReduced": false, "mustBeReducedPC": 0, "marks": 1, "unitTests": [], "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}], "scripts": {}, "showCorrectAnswer": true, "variableReplacements": [], "showFeedbackIcon": true}], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "metadata": {"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$.
"}, "tags": [], "functions": {}, "advice": "\n\\[B - \\lambda I_2 = \\begin{pmatrix} \\var{b11}-\\lambda & \\var{b12}\\\\ \\var{b21} & \\var{b22}-\\lambda \\end{pmatrix}\\]
Hence the characteristic polynomial $p(\\lambda)$ is: \\[\\begin{eqnarray*} \\mathrm{det}\\left(B-\\lambda I_2 \\right)&=&\\simplify[zeroTerm]{({b11}-lambda)({b22}-lambda)-{b12}*{b21}}\\\\ &=& \\simplify[std]{lambda^2-{trB}*lambda+{dB}}\\\\ \\end{eqnarray*} \\]
Solving $p(\\lambda)=0$ (e.g. by factorisation), we find the eigenvalues for $B$ are:
\\[\\lambda_1=\\var{mnB},\\;\\;\\;\\lambda_2=\\var{mxB}\\]
\n
(b)
\nRecall that an eigenvector $\\textbf{x}$ corresponding to eigenvalue $\\lambda$ will satisfy $B\\textbf{x} = \\lambda \\textbf{x}$
\n\n1. $\\lambda=\\var{mnB}$
\n\nWe have \\[ \\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22} \\end{pmatrix} \\begin{pmatrix} x_1 \\\\ 1 \\end{pmatrix} = \\var{mnB} \\begin{pmatrix} x_1 \\\\ 1 \\end{pmatrix} \\]
\n
Hence we obtain $ \\simplify[std]{{b11} x_1 + {b12} = {mnB} x_1}$ and $ \\simplify[std]{{b21} x_1 +{b22} = {mnB}}$, which we can solve to give $x_1=\\var{s*(b22-mnB)}$
Hence the eigenvector we want is \\[\\begin{pmatrix} \\var{s*(b22-mnB)}\\\\1 \\end{pmatrix}\\]
\n\n2. $\\lambda=\\var{mxB}$
\n\nWe have \\[ \\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22} \\end{pmatrix} \\begin{pmatrix} x_2 \\\\ 1 \\end{pmatrix} = \\var{mxB} \\begin{pmatrix} x_2 \\\\ 1 \\end{pmatrix} \\]
\n
Hence we obtain $ \\simplify[std]{{b11} x_2 + {b12} = {mxB} x_2}$ and $ \\simplify[std]{{b21} x_2 +{b22} = {mxB}}$, which we can solve to give $x_2=\\var{s*(b22-mxB)}$
Hence the eigenvector we want is \\[\\begin{pmatrix} \\var{s*(b22-mxB)}\\\\1 \\end{pmatrix}\\]
\n\n\n\n(c)
\nFor the last part we use the diagonalisation of $B$ given by the last two parts.
\nThus if $x_1,\\;\\;x_2,\\;\\;\\lambda_1,\\;\\;\\lambda_2$ are as above for $B$ then we have $B=PDP^{-1} \\Rightarrow B^{\\var{n}}=PD^{\\var{n}}P^{-1}$ where:
\n\\[\\begin{eqnarray*} P &=& \\begin{pmatrix} x_1 & x_2\\\\1&1 \\end{pmatrix} = \\begin{pmatrix} \\var{s*(b22-mnB)} & \\var{s*(b22-mxB)} \\\\1&1 \\end{pmatrix}\\Rightarrow P^{-1}= \\simplify[std]{1/{x1-x2}}\\begin{pmatrix} 1 & \\var{-s*(b22-mxB)} \\\\-1&\\var{s*(b22-mnB)} \\end{pmatrix}\\\\ \\\\ D&=& \\begin{pmatrix} \\lambda_1 & 0\\\\0&\\lambda_2 \\end{pmatrix} = \\begin{pmatrix} \\var{mnB} & 0\\\\0&\\var{mxB} \\end{pmatrix} \\Rightarrow D^{\\var{n}}=\\begin{pmatrix} \\var{mnB^n} & 0\\\\0&\\var{mxB^n} \\end{pmatrix} \\end{eqnarray*} \\]
\nHence \\[\\begin{eqnarray*}B^{\\var{n}}&=&PD^{\\var{n}}P^{-1}\\\\ \\\\ &=&\\simplify[std]{1/{x1-x2}}\\begin{pmatrix} \\var{s*(b22-mnB)} & \\var{s*(b22-mxB)} \\\\1&1 \\end{pmatrix}\\begin{pmatrix} \\var{mnB^n} & 0\\\\0&\\var{mxB^n} \\end{pmatrix}\\begin{pmatrix} 1 & \\var{-s*(b22-mxB)} \\\\-1&\\var{s*(b22-mnB)} \\end{pmatrix}\\\\ \\\\ &=&\\begin{pmatrix} \\var{bn11} & \\var{bn12}\\\\\\var{bn21}&\\var{bn22} \\end{pmatrix} \\end{eqnarray*} \\]
", "extensions": [], "preamble": {"js": "", "css": ""}, "variable_groups": [], "variables": {"b12": {"name": "b12", "definition": "s*(a1*b1-b11*a1-b11*b1+b11^2)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "b11": {"name": "b11", "definition": "switch(test1=a1,that,test1=b1,that,test1)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a22": {"name": "a22", "definition": "a+b-a11", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "bn11": {"name": "bn11", "definition": "round(s*cn11/f)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "that": {"name": "that", "definition": "if(mxB<0,mxB+random(1..6),mxB-random(1..6))", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "mxb": {"name": "mxb", "definition": "max(a1,b1)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "definition": "if(c2=a1,a1+random(1..3),c2)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "mxa": {"name": "mxa", "definition": "max(a,b)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "tra": {"name": "tra", "definition": "{a11+a22}", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "cn22": {"name": "cn22", "definition": "mxB^n*x1-mnB^n*x2", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "da": {"name": "da", "definition": "{a11*a22-a12*a21}", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "test": {"name": "test", "definition": "random(-8..8)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a21": {"name": "a21", "definition": "-s*(a*b-a11*a-a11*b+a11^2)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "cn21": {"name": "cn21", "definition": "mnB^n-mxB^n", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "x2": {"name": "x2", "definition": "s*(b22-mxB)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "bn21": {"name": "bn21", "definition": "round(s*cn21/f)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "bn12": {"name": "bn12", "definition": "round(s*cn12/f)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a11": {"name": "a11", "definition": "switch(test=a,this,test=b,this,test)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "n": {"name": "n", "definition": "random(4,5,6)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "c2": {"name": "c2", "definition": "random(-8..8)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "this": {"name": "this", "definition": "if(mxA<0,mxA+random(1..6),mxA-random(1..6))", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "b": {"name": "b", "definition": "if(c1=a,a+random(1..3),c1)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "cn11": {"name": "cn11", "definition": "mnB^n*x1-mxB^n*x2", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a12": {"name": "a12", "definition": "s", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "b21": {"name": "b21", "definition": "-s", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "mnb": {"name": "mnb", "definition": "min(a1,b1)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "s2": {"name": "s2", "definition": "random(1,-1)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "s1": {"name": "s1", "definition": "random(1,-1)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "b22": {"name": "b22", "definition": "a1+b1-b11", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "cn12": {"name": "cn12", "definition": "x1*x2*(mxB^n-mnB^n)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "f": {"name": "f", "definition": "abs(x1-x2)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a": {"name": "a", "definition": "random(-8..8)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "trb": {"name": "trb", "definition": "{b11+b22}", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "definition": "random(-8..8)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "mna": {"name": "mna", "definition": "min(a,b)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "test1": {"name": "test1", "definition": "random(-8..8)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "x1": {"name": "x1", "definition": "s*(b22-mnB)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "s": {"name": "s", "definition": "random(1,-1)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "db": {"name": "db", "definition": "{b11*b22-b12*b21}", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "definition": "random(-8..8)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "bn22": {"name": "bn22", "definition": "round(s*cn22/f)", "group": "Ungrouped variables", "description": "", "templateType": "anything"}}, "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}