// Numbas version: finer_feedback_settings {"name": "Norm of a vector in four dimensions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Norm of a vector in four dimensions", "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}

\n

So \\(\\|v\\|=\\sqrt{\\var{squarenorm}}\\).

", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "extensions": [], "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", "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/"}]}]}], "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/"}]}