// Numbas version: exam_results_page_options {"name": "Find eigenvalues and eigenvectors of matrices, and power of one matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"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}], "name": "Find eigenvalues and eigenvectors of matrices, and power of one matrix", "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

Input your answers as integers.

\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

Added tags.

\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*} \\]

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}