// Numbas version: finer_feedback_settings {"name": "Simon's copy of Represent a linear map as a matrix with a given basis", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a", "c", "b", "d", "f"], "variables": {"c": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(-9..9)", "name": "c"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(1..9 except 0)", "name": "b"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(1..9 except 0)", "name": "a"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(-9..9 except 0)", "name": "d"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "definition": "random(-9..9 except 0)", "name": "f"}}, "preamble": {"js": "", "css": ""}, "name": "Simon's copy of Represent a linear map as a matrix with a given basis", "statement": "

Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$  with coefficients in the real numbers.

\n

Let the linear map \\[\\phi: P_4 \\rightarrow P_4 \\] be defined by:

\n

\\[\\phi(p(x)) = \\simplify[all,!collectnumbers]{{a} * p(x) + ({b} * x + {c}) * p'(x) + (x ^ 2 + {d} * x + {f}) * p''(x)}\\]

\n

where  $p'(x)$ is the first derivative of $p(x)$  and $p''(x)$ the second derivative. 

", "extensions": [], "functions": {}, "metadata": {"description": "

Let $P_n$ denote the vector space over the reals of polynomials $p(x)$ of degree $n$  with coefficients in the real numbers.

\n

Let the linear map $\\phi: P_4 \\rightarrow P_4$ be defined by:

\n

$\\phi(p(x))=ap(x) + (bx + c)p'(x) + (x ^ 2 + dx + f)p''(x)$

\n

Using the standard basis for range and domain find the matrix given by $\\phi$.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"gaps": [{"correctAnswerStyle": "plain", "minValue": "{a}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{c}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{c}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{2*f}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{2*f}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "0", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "0", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{a+b}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a+b}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{2*d+2*c}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{2*d+2*c}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{6*f}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{6*f}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "0", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "0", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{a+2*b+2}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a+2*b+2}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{3*c+6*d}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{3*c+6*d}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{12*f}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{12*f}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "0", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "0", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{a+3*b+6}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a+3*b+6}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{4*c+12*d}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{4*c+12*d}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "0", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "0", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}, {"correctAnswerStyle": "plain", "minValue": "{a+4*b+12}", "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "maxValue": "{a+4*b+12}", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "showFeedbackIcon": true, "mustBeReducedPC": 0, "showFractionHint": true, "marks": 0.5, "customName": "", "unitTests": []}], "sortAnswers": false, "scripts": {}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "prompt": "Using the ordered basis $\\{1,\\;x,\\;x^2,\\;x^3,\\;x^4\\}$ of $P_4$ for both range and domain, $\\phi$ is represented by a 5 x 5 matrix.\n \n Fill in the entries for this matrix below: \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\\[\\left( \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\end{matrix} \\right.\\][[0]][[1]][[2]]$0$$0$\\[\\left) \\begin{matrix}\\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.}\\\\ \\phantom{.} \\\\ \\phantom{.}\\\\ \\phantom{.}\\\\\\end{matrix} \\right.\\]
[[3]][[4]][[5]][[6]]$0$
$0$[[7]][[8]][[9]][[10]]
$0$$0$[[11]][[12]][[13]]
$0$$0$$0$[[14]][[15]]
", "marks": 0, "customName": "", "unitTests": []}], "variable_groups": [], "tags": [], "advice": "

We have:

\n

\\[\\phi(1) =\\simplify[]{ {a} * 1 + ({b} * x + {c}) * 0 + (x ^ 2 + {d} * x + {f}) * 0 = {a} = {a} * 1 + 0 * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]

\n

which gives the first column of the matrix.

\n

\n

\\[\\phi(x) = \\simplify[]{{a} * x + ({b} * x + {c}) * 1 + (x ^ 2 + {d} * x + {f}) * 0 = {c} + {a + b} * x = {c} * 1 + {a + b} * x + 0 * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]

\n

gives the second column of the matrix.

\n

\n

\\[\\phi(x ^ 2) = \\simplify[]{{a} * x ^ 2 + ({b} * x + {c}) * 2 * x + (x ^ 2 + {d} * x + {f}) * 2 = {2 * f} + {2 * d + 2 * c} * x + {a + 2 * b + 2} * x ^ 2 = {2 * f} * 1 + {2 * d + 2 * c} * x + {a + 2 * b + 2} * x ^ 2 + 0 * x ^ 3 + 0 * x ^ 4}\\]

\n

gives the third column of the matrix.

\n

\n

Continuing on in this way for $\\phi(x^3),\\;\\phi(x^4)$ we obtain the matrix for $\\phi$ with respect to the given bases for domain and range.

\n

\\[\\begin{pmatrix}\\var{a}&\\var{c}&\\var{2*f}&0&0\\\\0&\\var{a+b}&\\var{2*d+2*c}&\\var{6*f}&0\\\\0&0&\\var{a+2*b+2}&\\var{3*c+6*d}&\\var{12*f}\\\\0&0&0&\\var{a+3*b+6}&\\var{4*c+12*d}\\\\0&0&0&0&\\var{a+4*b+12}\\end{pmatrix}\\]

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