// Numbas version: finer_feedback_settings {"name": "Inner product intro", "metadata": {"description": "
Simple questions to check comprehension of definition of Euclidean inner product and norm. Meant for formative use.
", "licence": "Creative Commons Attribution 4.0 International"}, "duration": 0, "percentPass": "0", "showQuestionGroupNames": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": "1", "questionNames": ["", "", "", ""], "questions": [{"name": "Inner product of two vectors in three dimensions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}], "tags": [], "metadata": {"description": "Given vectors $\\boldsymbol{v}$ and $\\boldsymbol{w}$, find their inner product.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "You are given the vectors $v= \\var{vector(a,b,g)}$ and $w = \\var{vector(c,d,f)}$ in $\\mathbb{R}^3$.
", "advice": "\\begin{align}
\\langle v,w\\rangle =v^T \\cdot w &= \\begin{pmatrix}\\var{a} &\\var{b} & \\var{g}\\end{pmatrix} \\begin{pmatrix}\\var{c}\\\\\\var{d}\\\\\\var{f}\\end{pmatrix} \\\\
&= \\simplify[timesdot]{{a}*{c}+{b}*{d}+{g}*{f}} \\\\
&= \\var{inner}
\\end{align}
Find the inner product $\\langle v,w\\rangle = v^T w = $ [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{inner}", "maxValue": "{inner}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Norm of a vector in three dimensions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}], "tags": [], "metadata": {"description": "Given vector $\\boldsymbol{v}$ find the norm. Since putting in square roots is tricky, actually input the square norm, so it's an integer.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "You are given the vector $v= \\var{vector(a,b,g)}$ in $\\mathbb{R}^3$.
", "advice": "\\begin{align}
\\|v\\|^2 =v^T \\cdot v &= \\begin{pmatrix}\\var{a} &\\var{b} & \\var{g}\\end{pmatrix} \\begin{pmatrix}\\var{a}\\\\\\var{b}\\\\\\var{g}\\end{pmatrix} \\\\
&= \\simplify[]{{a}^2+{b}^2+{g}^2} \\\\
&= \\var{squarenorm}
\\end{align}
So \\(\\|v\\|=\\sqrt{\\var{squarenorm}}\\).
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variables": {"s1": {"name": "s1", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "s2*random(2..9)", "description": "", "templateType": "anything"}, "s2": {"name": "s2", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "norm": {"name": "norm", "group": "Ungrouped variables", "definition": "sqrt(a^2+b^2+g^2)", "description": "", "templateType": "anything"}, "s3": {"name": "s3", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "s1*random(2..9)", "description": "", "templateType": "anything"}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "s3*random(2..9)", "description": "", "templateType": "anything"}, "squarenorm": {"name": "squarenorm", "group": "Ungrouped variables", "definition": "a^2+b^2+g^2", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "g", "s3", "s2", "s1", "norm", "squarenorm"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find the norm \\(\\|v\\|\\), by giving the square of the norm, \\(\\|v\\|^2=\\) [[0]].
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{squarenorm}", "maxValue": "{squarenorm}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Inner product of two vectors in four dimensions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}], "tags": [], "metadata": {"description": "Given vectors $\\boldsymbol{v}$ and $\\boldsymbol{w}$, find their inner product.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "You are given the vectors $v= \\var{v}$ and $w = \\var{w}$ in $\\mathbb{R}^4$.
", "advice": "\\begin{align}
\\langle v,w\\rangle =v^T \\cdot w &= \\begin{pmatrix}\\var{v[0]} &\\var{v[1]} & \\var{v[2]}& \\var{v[3]}\\end{pmatrix} \\var{w} \\\\
&= \\simplify[timesdot]{{v[0]}*{w[0]}+{v[1]}*{w[1]}+{v[2]}*{w[2]}+{v[3]}*{w[3]}} \\\\
&= \\var{inner}
\\end{align}
Find the inner product $\\langle v,w\\rangle = v^T w = $ [[0]]
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{inner}", "maxValue": "{inner}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Norm of a vector in four dimensions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}], "tags": [], "metadata": {"description": "Given vector $\\boldsymbol{v}$ find the norm. Since putting in square roots is tricky, actually input the square norm, so it's an integer.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "You are given the vector $v= \\var{v}$ in $\\mathbb{R}^4$.
", "advice": "\\begin{align}
\\|v\\|^2 =v^T \\cdot v &= \\begin{pmatrix}\\var{v[0]} &\\var{v[1]} & \\var{v[2]}& \\var{v[3]}\\end{pmatrix} \\var{v} \\\\
&= \\simplify[]{{v[0]}^2+{v[1]}^2+{v[2]}^2+{v[3]}^2} \\\\
&= \\var{squarenorm}
\\end{align}
So \\(\\|v\\|=\\sqrt{\\var{squarenorm}}\\).
", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variables": {"v": {"name": "v", "group": "Ungrouped variables", "definition": "vector(repeat(random(-5..5),4))", "description": "", "templateType": "anything"}, "squarenorm": {"name": "squarenorm", "group": "Ungrouped variables", "definition": "dot(v,v)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["v", "squarenorm"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find the norm \\(\\|v\\|\\), by giving the square of the norm, \\(\\|v\\|^2=\\) [[0]].
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{squarenorm}", "maxValue": "{squarenorm}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "showresultspage": "oncompletion", "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": false, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "Intro questions for inner product and norm. You can check if you understood the definitions.
", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "inreview"}, "type": "exam", "contributors": [{"name": "Julia Goedecke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/5121/"}], "extensions": [], "custom_part_types": [], "resources": []}