// Numbas version: exam_results_page_options {"name": "Harry's copy of Find eigenvalues, characteristic polynomial and a normalised eigenvector of a 3x3 matrix", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Harry's copy of Find eigenvalues, characteristic polynomial and a normalised eigenvector of a 3x3 matrix", "type": "question", "statement": "

Let $M=\\var{M}$.  Answer the following questions.

", "variable_groups": [], "variables": {"a": {"name": "a", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2..2 except 0)", "description": ""}, "M": {"name": "M", "templateType": "anything", "group": "Ungrouped variables", "definition": "p*D*invp", "description": ""}, "coefflamsq": {"name": "coefflamsq", "templateType": "anything", "group": "Ungrouped variables", "definition": "eigen1+eigen2+eigen3", "description": ""}, "p": {"name": "p", "templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([-1,g,1],[b,-g*b,1-b],[a,b,-a])", "description": ""}, "invp": {"name": "invp", "templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([0,1,g],[a,0,1],[b,1,0])", "description": ""}, "eigen1": {"name": "eigen1", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": ""}, "eigen2": {"name": "eigen2", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except [0,eigen1])", "description": ""}, "det": {"name": "det", "templateType": "anything", "group": "Ungrouped variables", "definition": "eigen1*eigen2*eigen3", "description": ""}, "b": {"name": "b", "templateType": "anything", "group": "Ungrouped variables", "definition": "1-g*a", "description": ""}, "D": {"name": "D", "templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([eigen1,0,0],[0,eigen2,0],[0,0,eigen3])", "description": ""}, "g": {"name": "g", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": ""}, "coefflam": {"name": "coefflam", "templateType": "anything", "group": "Ungrouped variables", "definition": "-(eigen1*eigen2+eigen1*eigen3+eigen2*eigen3)", "description": ""}, "eigen3": {"name": "eigen3", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except[0,eigen1,eigen2])", "description": ""}}, "rulesets": {}, "functions": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "notes": "

Created 19/09/2014

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

"}, "tags": ["characteristic equation", "characteristic polynomial", "checked2015", "determinant", "eigenvalues", "eigenvectors", "linear algebra", "linear equations", "MAS1602", "matrices", "matrix algebra"], "parts": [{"type": "gapfill", "showCorrectAnswer": true, "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

", "marks": 0, "scripts": {}, "gaps": [{"showPrecisionHint": false, "type": "numberentry", "minValue": "eigen1", "correctAnswerFraction": false, "allowFractions": false, "maxValue": "eigen1", "showCorrectAnswer": true, "marks": 1, "scripts": {}}, {"showPrecisionHint": false, "type": "numberentry", "minValue": "eigen3", "correctAnswerFraction": false, "allowFractions": false, "maxValue": "eigen3", "showCorrectAnswer": true, "marks": 1, "scripts": {}}]}, {"type": "gapfill", "showCorrectAnswer": true, "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.

", "marks": 0, "scripts": {}, "gaps": [{"type": "jme", "checkvariablenames": false, "showpreview": true, "vsetrange": [0, 1], "answer": "-lambda^3+{coefflamsq}*lambda^2+{coefflam}*lambda+{det}", "scripts": {}, "answersimplification": "all", "checkingaccuracy": 0.001, "vsetrangepoints": 5, "checkingtype": "absdiff", "expectedvariablenames": [], "showCorrectAnswer": true, "marks": 1}, {"showPrecisionHint": false, "type": "numberentry", "minValue": "eigen2", "correctAnswerFraction": false, "allowFractions": false, "maxValue": "eigen2", "showCorrectAnswer": true, "marks": 1, "scripts": {}}, {"type": "jme", "checkvariablenames": false, "showpreview": true, "vsetrange": [0, 1], "answer": "{-b}", "scripts": {}, "checkingaccuracy": 0.001, "vsetrangepoints": 5, "checkingtype": "absdiff", "expectedvariablenames": [], "showCorrectAnswer": true, "marks": 1}, {"notallowed": {"showStrings": false, "strings": ["."], "message": "

Enter numbers as fractions or integers and not as decimals.

", "partialCredit": 0}, "checkvariablenames": false, "showpreview": true, "vsetrange": [0, 1], "answer": "{b}/{g}", "scripts": {}, "answersimplification": "all,fractionNumbers", "checkingaccuracy": 0.001, "type": "jme", "checkingtype": "absdiff", "expectedvariablenames": [], "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}]}], "ungrouped_variables": ["a", "b", "D", "g", "det", "M", "coefflamsq", "invp", "p", "coefflam", "eigen2", "eigen3", "eigen1"], "question_groups": [{"name": "", "questions": [], "pickingStrategy": "all-ordered", "pickQuestions": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "showQuestionGroupNames": false, "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})}$.

", "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": ""}, "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}]}], "contributors": [{"name": "Harry Flynn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/976/"}]}