// Numbas version: finer_feedback_settings {"name": "Ugur'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": [{"variable_groups": [], "variables": {"eigen3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except[0,eigen1,eigen2])", "description": "", "name": "eigen3"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "1-g*a", "description": "", "name": "b"}, "invp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([0,1,g],[a,0,1],[b,1,0])", "description": "", "name": "invp"}, "det": {"templateType": "anything", "group": "Ungrouped variables", "definition": "eigen1*eigen2*eigen3", "description": "", "name": "det"}, "coefflam": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-(eigen1*eigen2+eigen1*eigen3+eigen2*eigen3)", "description": "", "name": "coefflam"}, "M": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p*D*invp", "description": "", "name": "M"}, "eigen2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except [0,eigen1])", "description": "", "name": "eigen2"}, "coefflamsq": {"templateType": "anything", "group": "Ungrouped variables", "definition": "eigen1+eigen2+eigen3", "description": "", "name": "coefflamsq"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2..2 except 0)", "description": "", "name": "a"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "g"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([-1,g,1],[b,-g*b,1-b],[a,b,-a])", "description": "", "name": "p"}, "eigen1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "eigen1"}, "D": {"templateType": "anything", "group": "Ungrouped variables", "definition": "matrix([eigen1,0,0],[0,eigen2,0],[0,0,eigen3])", "description": "", "name": "D"}}, "ungrouped_variables": ["a", "b", "D", "g", "det", "M", "coefflamsq", "invp", "p", "coefflam", "eigen2", "eigen3", "eigen1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Ugur's copy of Find eigenvalues, characteristic polynomial and a normalised eigenvector of a 3x3 matrix", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "eigen1", "minValue": "eigen1", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "eigen3", "minValue": "eigen3", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "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

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

Enter numbers as fractions or integers and not as decimals.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "all,fractionNumbers", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "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.

", "showCorrectAnswer": true, "marks": 0}], "statement": "

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

", "tags": ["characteristic equation", "characteristic polynomial", "checked2015", "determinant", "eigenvalues", "eigenvectors", "linear algebra", "linear equations", "MAS1602", "matrices", "matrix algebra"], "rulesets": {}, "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": ""}, "type": "question", "metadata": {"notes": "

Created 19/09/2014

", "licence": "Creative Commons Attribution 4.0 International", "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)$.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "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})}$.

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