// Numbas version: exam_results_page_options {"name": "Eigenvalues and Eigenvectors of a 2x2 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", "b1", "mna", "mnb", "s2", "s1", "a12", "test", "a11", "that", "da", "a1", "c2", "c1", "mxb", "mxa", "a", "b", "tra", "n", "this", "s"], "name": "Eigenvalues and Eigenvectors of a 2x2 Matrix", "tags": ["diagonalising matrices", "eigenvalues", "eigenvalues of matrix", "eigenvectors of matrix", "matrix", "matrix eigenvalues", "test5"], "advice": "

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

Finding the eigenvectors:

\n

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

\n

We have the eigenspace is given by all $v=(x,y)^\\mathrm{T}$ such that $(\\simplify{A-{mnA}}I_2)v=(0,0)^\\mathrm{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_2=\\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}\\]

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n \n \n

Find the eigenvalues of $A$.

\n \n \n \n

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

\n \n \n \n

Let $a_2$ be the greatest eigenvalue of $A,\\;\\; a_2=\\;\\;$[[1]]

\n \n \n \n \n \n \n ", "marks": 0, "gaps": [{"allowFractions": false, "scripts": {}, "maxValue": "{mnA}", "minValue": "{mnA}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{mxA}", "minValue": "{mxA}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

Find eigenvectors for $A$.

\n

Let $(1,y_1)^\\mathrm{T}$ be an eigenvector corresponding to the eigenvalue $a_1$.

\n

$y_1=$ [[0]]

\n

Let $(1,y_2)^\\mathrm{T}$ be an eigenvector corresponding to the eigenvalue $a_2$.

\n

$y_2=$ [[1]]

", "marks": 0, "gaps": [{"allowFractions": false, "scripts": {}, "maxValue": "{s*(mnA-a11)}", "minValue": "{s*(mnA-a11)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "scripts": {}, "maxValue": "{s*(mxA-a11)}", "minValue": "{s*(mxA-a11)}", "correctAnswerFraction": false, "showCorrectAnswer": true, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "

Find the eigenvalues and eigenvectors for the matrix $A$ where:
\\[ A=\\begin{pmatrix} \\var{a11}&\\var{a12}\\\\ \\var{a21}&\\var{a22} \\end{pmatrix}\\]

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "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": ""}, "b1": {"definition": "if(c2=a1,a1+random(1..3),c2)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "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": ""}, "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": ""}, "a12": {"definition": "s", "templateType": "anything", "group": "Ungrouped variables", "name": "a12", "description": ""}, "test": {"definition": "random(-8..8)", "templateType": "anything", "group": "Ungrouped variables", "name": "test", "description": ""}, "a11": {"definition": "switch(test=a,this,test=b,this,test)", "templateType": "anything", "group": "Ungrouped variables", "name": "a11", "description": ""}, "that": {"definition": "if(mxB<0,mxB+random(1..6),mxB-random(1..6))", "templateType": "anything", "group": "Ungrouped variables", "name": "that", "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": ""}, "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": ""}, "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": ""}, "tra": {"definition": "{a11+a22}", "templateType": "anything", "group": "Ungrouped variables", "name": "tra", "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": {"notes": "

21/04/13 Based on Bill's \"Eigenvalues and eigenvectors\" combo question...

", "description": "

Find eigenvalues and eigenvectors of $A$ $2 \\times 2$ matrix.

", "licence": "None specified"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Hayley Bishop", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/93/"}]}]}], "contributors": [{"name": "Hayley Bishop", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/93/"}]}