// Numbas version: exam_results_page_options {"name": "Gareth'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": [{"functions": {}, "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"], "name": "Gareth's copy of Find eigenvalues and eigenvectors of matrices, and power of one matrix", "tags": [], "preamble": {"css": "", "js": ""}, "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*} \\]

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"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]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{mnA}", "minValue": "{mnA}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{mxA}", "minValue": "{mxA}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "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]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{s*(mnA-a11)}", "minValue": "{s*(mnA-a11)}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{s*(mxA-a11)}", "minValue": "{s*(mxA-a11)}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "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 ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{mnB}", "minValue": "{mnB}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{mxB}", "minValue": "{mxB}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "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]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{x1}", "minValue": "{x1}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{x2}", "minValue": "{x2}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "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

Input your answers as integers.

\n ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{bn11}", "minValue": "{bn11}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{bn12}", "minValue": "{bn12}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{bn21}", "minValue": "{bn21}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "{bn22}", "minValue": "{bn22}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "

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},\\;\\;\\;\\;\\; B=\\begin{pmatrix} \\var{b11}&\\var{b12}\\\\ \\var{b21}&\\var{b22} \\end{pmatrix} \\]

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"test1": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "test1", "description": ""}, "a21": {"definition": "-s*(a*b-a11*a-a11*b+a11^2)", "templateType": "anything", "group": "Ungrouped variables", "name": "a21", "description": ""}, "a22": {"definition": "a+b-a11", "templateType": "anything", "group": "Ungrouped variables", "name": "a22", "description": ""}, "bn22": {"definition": "round(s*cn22/f)", "templateType": "anything", "group": "Ungrouped variables", "name": "bn22", "description": ""}, "bn21": {"definition": "round(s*cn21/f)", "templateType": "anything", "group": "Ungrouped variables", "name": "bn21", "description": ""}, "b22": {"definition": "a1+b1-b11", "templateType": "anything", "group": "Ungrouped variables", "name": "b22", "description": ""}, "b21": {"definition": "-s", "templateType": "anything", "group": "Ungrouped variables", "name": "b21", "description": ""}, "b1": {"definition": "if(c2=a1,a1+random(1..3),c2)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "cn11": {"definition": "mnB^n*x1-mxB^n*x2", "templateType": "anything", "group": "Ungrouped variables", "name": "cn11", "description": ""}, "mna": {"definition": "min(a,b)", "templateType": "anything", "group": "Ungrouped variables", "name": "mna", "description": ""}, "mnb": {"definition": "min(a1,b1)", "templateType": "anything", "group": "Ungrouped variables", "name": "mnb", "description": ""}, "cn12": {"definition": "x1*x2*(mxB^n-mnB^n)", "templateType": "anything", "group": "Ungrouped variables", "name": "cn12", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "that": {"definition": "if(mxB<0,mxB+random(1..6),mxB-random(1..6))", "templateType": "anything", "group": "Ungrouped variables", "name": "that", "description": ""}, "b12": {"definition": "s*(a1*b1-b11*a1-b11*b1+b11^2)", "templateType": "anything", "group": "Ungrouped variables", "name": "b12", "description": ""}, "b11": {"definition": "switch(test1=a1,that,test1=b1,that,test1)", "templateType": "anything", "group": "Ungrouped variables", "name": "b11", "description": ""}, "test": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "test", "description": ""}, "cn21": {"definition": "mnB^n-mxB^n", "templateType": "anything", "group": "Ungrouped variables", "name": "cn21", "description": ""}, "cn22": {"definition": "mxB^n*x1-mnB^n*x2", "templateType": "anything", "group": "Ungrouped variables", "name": "cn22", "description": ""}, "a11": {"definition": "switch(test=a,this,test=b,this,test)", "templateType": "anything", "group": "Ungrouped variables", "name": "a11", "description": ""}, "a12": {"definition": "s", "templateType": "anything", "group": "Ungrouped variables", "name": "a12", "description": ""}, "db": {"definition": "{b11*b22-b12*b21}", "templateType": "anything", "group": "Ungrouped variables", "name": "db", "description": ""}, "bn12": {"definition": "round(s*cn12/f)", "templateType": "anything", "group": "Ungrouped variables", "name": "bn12", "description": ""}, "bn11": {"definition": "round(s*cn11/f)", "templateType": "anything", "group": "Ungrouped variables", "name": "bn11", "description": ""}, "da": {"definition": "{a11*a22-a12*a21}", "templateType": "anything", "group": "Ungrouped variables", "name": "da", "description": ""}, "a1": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "x2": {"definition": "s*(b22-mxB)", "templateType": "anything", "group": "Ungrouped variables", "name": "x2", "description": ""}, "c2": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "c2", "description": ""}, "c1": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}, "x1": {"definition": "s*(b22-mnB)", "templateType": "anything", "group": "Ungrouped variables", "name": "x1", "description": ""}, "mxb": {"definition": "max(a1,b1)", "templateType": "anything", "group": "Ungrouped variables", "name": "mxb", "description": ""}, "mxa": {"definition": "max(a,b)", "templateType": "anything", "group": "Ungrouped variables", "name": "mxa", "description": ""}, "a": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "if(c1=a,a+random(1..3),c1)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "f": {"definition": "abs(x1-x2)", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "tra": {"definition": "{a11+a22}", "templateType": "anything", "group": "Ungrouped variables", "name": "tra", "description": ""}, "trb": {"definition": "{b11+b22}", "templateType": "anything", "group": "Ungrouped variables", "name": "trb", "description": ""}, "n": {"definition": "random(4,5,6)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "this": {"definition": "if(mxA<0,mxA+random(1..6),mxA-random(1..6))", "templateType": "anything", "group": "Ungrouped variables", "name": "this", "description": ""}, "s": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}}, "metadata": {"description": "

$A,\\;B$ $2 \\times 2$ matrices. Find eigenvalues and eigenvectors of both. Hence or otherwise, find $B^n$ for largish $n$.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}]}], "contributors": [{"name": "Gareth Woods", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/978/"}]}