// Numbas version: exam_results_page_options {"name": "Matrices: Basics (Instructional)", "metadata": {"description": "Basic definitions: Order, elements, Trace and Transpose.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", ""], "variable_overrides": [[], [], [], []], "questions": [{"name": "Matrices: Basics 01", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}], "tags": [], "metadata": {"description": "Classifying matrices (dimensions/order)", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

The General Matrix

\n

A general $m \\times n$ matrix $A$ has $m$ rows and $n$ columns.
The entries in the matrix $A$ are called the elements of $A$.
In matrix $A$ the element in row $i$ and column $j$ is denoted by $a_{ij}$ .

", "advice": "

We are presented with random matrices and asked to \"classify\" them. 

\n

This simply means \"give their dimensions\" - how many rows and columns do they have?

\n

In mathematical language you need to know that:

\n

A general $m \\times n$ matrix $A$ has $m$ rows and $n$ columns.

\n

In simpler terms, the size is ALWAYS given as:

\n

$\\Large ROWS \\times COLUMNS $

\n

\n

Once you remember this, these are very straightforward.

\n

  

\n

$A=\\var{A}$     $A$ has $\\var{n1}$ rows and $\\var{m1}$ columns. So $A$ has dimensions $ \\var{n1}  \\times  \\var{m1}$

\n

 

\n

$B=\\var{B}$     $B$ has $\\var{n2}$ rows and $\\var{m2}$ columns. So $B$ has dimensions $ \\var{n2}  \\times \\var{m2}$

\n

 

\n

$C=\\var{C}$     $C$ has $\\var{n3}$ rows and $\\var{m3}$ columns. So $C$ has dimensions $ \\var{n3}  \\times \\var{m3}$

\n

 

\n

$D=\\var{D}$     $D$ has $\\var{n4}$ rows and $\\var{m4}$ columns. So $D$ has dimensions $ \\var{n4}  \\times \\var{m4}$

\n

 

\n

$E=\\var{EE}$     $E$ has $\\var{n5}$ rows and $\\var{m5}$ columns. So $E$ has dimensions $ \\var{n5}  \\times \\var{m5}$

", "rulesets": {}, "variables": {"m1": {"name": "m1", "group": "A", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "A": {"name": "A", "group": "A", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n1),m1)))", "description": "", "templateType": "anything"}, "n2": {"name": "n2", "group": "B", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "m2": {"name": "m2", "group": "B", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "B": {"name": "B", "group": "B", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n2),m2)))", "description": "", "templateType": "anything"}, "n3": {"name": "n3", "group": "C", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "m3": {"name": "m3", "group": "C", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "C": {"name": "C", "group": "C", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n3),m3)))", "description": "", "templateType": "anything"}, "n4": {"name": "n4", "group": "D", "definition": "random(1..(n3-1) except n3)", "description": "", "templateType": "anything"}, "m4": {"name": "m4", "group": "D", "definition": "random(1..(m3-1) except m3)", "description": "", "templateType": "anything"}, "n1": {"name": "n1", "group": "A", "definition": "random(1..(m3-1) except m3)", "description": "", "templateType": "anything"}, "D": {"name": "D", "group": "D", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n4),m4)))", "description": "", "templateType": "anything"}, "n5": {"name": "n5", "group": "E", "definition": "m3", "description": "", "templateType": "anything"}, "m5": {"name": "m5", "group": "E", "definition": "n4", "description": "", "templateType": "anything"}, "EE": {"name": "EE", "group": "E", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n5),m5)))", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "A", "variables": ["n1", "m1", "A"]}, {"name": "B", "variables": ["n2", "m2", "B"]}, {"name": "C", "variables": ["n3", "m3", "C"]}, {"name": "D", "variables": ["n4", "m4", "D"]}, {"name": "E", "variables": ["n5", "m5", "EE"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Classify the following matrices:

\n

 

\n

$A=\\var{A}$

\n

$A$ is a [[0]]$\\times$ [[1]] matrix.

\n

 

\n

 

\n

$B=\\var{B}$

\n

$B$ is a [[2]]$\\times$ [[3]] matrix.

\n

 

\n

 

\n

$C=\\var{C}$

\n

$C$ is a [[4]]$\\times$ [[5]] matrix.

\n

 

\n

 

\n

$D=\\var{D}$

\n

$D$ is a [[6]]$\\times$ [[7]] matrix.

\n

 

\n

$E=\\var{EE}$

\n

$E$ is a [[8]]$\\times$ [[9]] matrix.

\n

 

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{n1}", "maxValue": "{n1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{m1}", "maxValue": "{m1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{n2}", "maxValue": "{n2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{m2}", "maxValue": "{m2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{n3}", "maxValue": "{n3}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{m3}", "maxValue": "{m3}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{n4}", "maxValue": "{n4}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{m4}", "maxValue": "{m4}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{n5}", "maxValue": "{n5}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{m5}", "maxValue": "{m5}", "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"}, {"name": "Matrices: Basics 02", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}], "tags": [], "metadata": {"description": "Identify element of a matrix.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

The General Matrix

\n

A general $m \\times n$ matrix $A$ has $m$ rows and $n$ columns.
The entries in the matrix $A$ are called the elements of $A$.
In matrix $A$ the element in row $i$ and column $j$ is denoted by $a_{ij}$ .

", "advice": "

We are presented with random matrices and asked to identify certain elements of those matrices.

\n

What you need to remember is:

\n

In matrix $A$ the element in row $i$ and column $j$ is denoted by $a_{ij}$ .

\n

 

\n

In easier terms, in the subscript the numbers represent row then column

\n

 

\n

So given the matrix  $A=\\var{A}$

\n

$a_{\\var{n1}\\var{m1}}$ is the element in row $\\var{n1}$ and column $\\var{m1}$. Therefore,  $a_{\\var{n1}\\var{m1}}=\\var{E1}$

\n

 

\n

given the matrix  $B=\\var{B}$

\n

$b_{\\var{n2}\\var{m2}}$ is the element in row $\\var{n2}$ and column $\\var{m2}$. Therefore,  $b_{\\var{n2}\\var{m2}}=\\var{E2}$

\n

 

\n

given the matrix  $C=\\var{C}$

\n

$c_{\\var{n3}\\var{m3}}$ is the element in row $\\var{n3}$ and column $\\var{m3}$. Therefore,  $b_{\\var{n2}\\var{m2}}=\\var{E3}$

\n

 

\n

and

\n

 

\n

$c_{\\var{n4}\\var{m4}}$ is the element in row $\\var{n4}$ and column $\\var{m4}$. Therefore,  $b_{\\var{n2}\\var{m2}}=\\var{E4}$

\n

", "rulesets": {}, "variables": {"m1": {"name": "m1", "group": "A", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "A": {"name": "A", "group": "A", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n1),m1)))", "description": "", "templateType": "anything"}, "n2": {"name": "n2", "group": "B", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "m2": {"name": "m2", "group": "B", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "B": {"name": "B", "group": "B", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n2),m2)))", "description": "", "templateType": "anything"}, "n3": {"name": "n3", "group": "C", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "m3": {"name": "m3", "group": "C", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "C": {"name": "C", "group": "C", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n3),m3)))", "description": "", "templateType": "anything"}, "n4": {"name": "n4", "group": "D", "definition": "random(1..(n3-1) except n3)", "description": "", "templateType": "anything"}, "m4": {"name": "m4", "group": "D", "definition": "random(1..(m3-1) except m3)", "description": "", "templateType": "anything"}, "n1": {"name": "n1", "group": "A", "definition": "random(1..(m3-1) except m3)", "description": "", "templateType": "anything"}, "D": {"name": "D", "group": "D", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n4),m4)))", "description": "", "templateType": "anything"}, "n5": {"name": "n5", "group": "E", "definition": "m3", "description": "", "templateType": "anything"}, "m5": {"name": "m5", "group": "E", "definition": "n4", "description": "", "templateType": "anything"}, "EE": {"name": "EE", "group": "E", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n5),m5)))", "description": "", "templateType": "anything"}, "e1": {"name": "e1", "group": "A", "definition": "A[n1-1][m1-1]", "description": "", "templateType": "anything"}, "E2": {"name": "E2", "group": "B", "definition": "b[n2-1][m2-1]", "description": "", "templateType": "anything"}, "E3": {"name": "E3", "group": "C", "definition": "c[n3-1][m3-1]", "description": "", "templateType": "anything"}, "E4": {"name": "E4", "group": "C", "definition": "c[n4-1][m4-1]", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "A", "variables": ["n1", "m1", "A", "e1"]}, {"name": "B", "variables": ["n2", "m2", "B", "E2"]}, {"name": "C", "variables": ["n3", "m3", "C", "E3", "E4"]}, {"name": "D", "variables": ["n4", "m4", "D"]}, {"name": "E", "variables": ["n5", "m5", "EE"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Given the matrices:

\n

 $A=\\var{A}$     $B=\\var{B}$     $C=\\var{C}$

\n

\n

\n

 Give the values of the following elements of the matrices above:

\n

 

\n

$a_{\\var{n1}\\var{m1}}=$ [[0]]

\n

 

\n

$b_{\\var{n2}\\var{m2}}=$ [[1]]

\n

 

\n

$c_{\\var{n3}\\var{m3}}=$ [[2]]

\n

 

\n

$c_{\\var{n4}\\var{m4}}=$ [[3]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "A[n1-1][m1-1]", "maxValue": "A[n1-1][m1-1]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "b[n2-1][m2-1]", "maxValue": "b[n2-1][m2-1]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "c[n3-1][m3-1]", "maxValue": "c[n3-1][m3-1]", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "c[n4-1][m4-1]", "maxValue": "c[n4-1][m4-1]", "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"}, {"name": "Matrices: Basics 03", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}], "tags": [], "metadata": {"description": "Square matrices, leading/principle diagonal and trace.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

Square Matrices

\n

When the number of rows is the same as the number of colums i.e. $m=n$, the matrix is said to be square and of order $n$ (or $m$ since they are the same).

\n

In an $n \\times n$ square matrix $A$, the leading diagonal (or principal diagonal) is the top-left to bottom right collection of elements   $a_{11}, a_{22}, a_{33}, . . . ,a_{nn}$.

\n

The sum of the elements in the leading diagonal of $A$ is called the trace of the matrix and we write it as $tr(A)$.

\n

If          $ A= \\left( \\begin{array}{ccc} a_{11} & a_{12} & ... & a_{1n}\\\\ a_{21} & a_{22} & ... & a_{2n}\\\\ \\vdots & \\vdots & \\vdots & \\vdots\\\\ a_{n1} & a_{n2} & ... & a_{nn} \\end{array} \\right)   $               then               $ tr(A)= a_{11}+a_{22}+...+a_{nn}$

", "advice": "

We are presented with random matrices and asked to calculate the trace of each one.

\n

\n

Remembering that, for a square matrix, the trace is the sum of the elements in the leading diagonal. 

\n

Begin at the top left element and work down to the bottom right element, adding as you go.

\n

$A=\\var{A}$

\n

$tr(A)=\\var{A[0][0]}+\\var{A[1][1]} +\\var{A[2][2]}=\\var{trA}                                              $

\n

 

\n

$B=\\var{B}$

\n

$tr(B)=\\var{B[0][0]}+\\var{B[1][1]}=\\var{trB}                                              $

\n

 

\n

$C=\\var{C}$

\n

$tr(C)=\\var{C[0][0]}+\\var{C[1][1]} +\\var{C[2][2]}+\\var{C[3][3]} +\\var{C[4][4]}=\\var{trC}                                              $

\n

 

\n

$D=\\var{D}$

\n

$tr(D)=\\var{D[0][0]}+\\var{D[1][1]} +\\var{D[2][2]}+\\var{D[3][3]}=\\var{trD}                                              $

\n

 

\n

$E=\\var{EE}$

\n

$tr(E)=\\var{EE[0][0]}+\\var{EE[1][1]} +\\var{EE[2][2]}=\\var{trE}                                              $

", "rulesets": {}, "variables": {"m1": {"name": "m1", "group": "A", "definition": "n1", "description": "", "templateType": "anything"}, "A": {"name": "A", "group": "A", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n1),m1)))", "description": "", "templateType": "anything"}, "n2": {"name": "n2", "group": "B", "definition": "2", "description": "", "templateType": "number"}, "m2": {"name": "m2", "group": "B", "definition": "n2", "description": "", "templateType": "anything"}, "B": {"name": "B", "group": "B", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n2),m2)))", "description": "", "templateType": "anything"}, "n3": {"name": "n3", "group": "C", "definition": "5", "description": "", "templateType": "number"}, "m3": {"name": "m3", "group": "C", "definition": "n3", "description": "", "templateType": "anything"}, "C": {"name": "C", "group": "C", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n3),m3)))", "description": "", "templateType": "anything"}, "n4": {"name": "n4", "group": "D", "definition": "m4", "description": "", "templateType": "anything"}, "m4": {"name": "m4", "group": "D", "definition": "4", "description": "", "templateType": "number"}, "n1": {"name": "n1", "group": "A", "definition": "3", "description": "", "templateType": "number"}, "D": {"name": "D", "group": "D", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n4),m4)))", "description": "", "templateType": "anything"}, "n5": {"name": "n5", "group": "E", "definition": "n1", "description": "", "templateType": "anything"}, "m5": {"name": "m5", "group": "E", "definition": "n1", "description": "", "templateType": "anything"}, "EE": {"name": "EE", "group": "E", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n5),m5)))", "description": "", "templateType": "anything"}, "e1": {"name": "e1", "group": "A", "definition": "A[n1-1][m1-1]", "description": "", "templateType": "anything"}, "E2": {"name": "E2", "group": "B", "definition": "b[n2-1][m2-1]", "description": "", "templateType": "anything"}, "E3": {"name": "E3", "group": "C", "definition": "c[n3-1][m3-1]", "description": "", "templateType": "anything"}, "E4": {"name": "E4", "group": "C", "definition": "c[n4-1][m4-1]", "description": "", "templateType": "anything"}, "trA": {"name": "trA", "group": "A", "definition": "(A[0][0])+(A[1][1])+(A[2][2])", "description": "", "templateType": "anything"}, "trB": {"name": "trB", "group": "B", "definition": "(B[0][0])+(B[1][1])", "description": "", "templateType": "anything"}, "trC": {"name": "trC", "group": "C", "definition": "(C[0][0])+(C[1][1])+(C[2][2])+(C[3][3])+(C[4][4])", "description": "", "templateType": "anything"}, "trD": {"name": "trD", "group": "D", "definition": "(D[0][0])+(D[1][1])+(D[2][2])+(D[3][3])", "description": "", "templateType": "anything"}, "trE": {"name": "trE", "group": "E", "definition": "(EE[0][0])+(EE[1][1])+(EE[2][2])", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "A", "variables": ["n1", "m1", "A", "e1", "trA"]}, {"name": "B", "variables": ["n2", "m2", "B", "E2", "trB"]}, {"name": "C", "variables": ["n3", "m3", "C", "E3", "E4", "trC"]}, {"name": "D", "variables": ["n4", "m4", "D", "trD"]}, {"name": "E", "variables": ["n5", "m5", "EE", "trE"]}], "functions": {"calculateTrace": {"parameters": [], "type": "number", "language": "javascript", "definition": ""}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the trace of the following matrices:

\n

\n

$A=\\var{A}$        

\n

$tr(A)=$ [[0]]

\n

 

\n

$B=\\var{B}$          

\n

$tr(B)=$ [[1]]

\n

 

\n

$C=\\var{C}$       

\n

$tr(C)=$ [[2]]

\n

 

\n

$D=\\var{D}$       

\n

$tr(D)=$ [[3]]

\n

 

\n

$E=\\var{EE}$       

\n

$tr(E)=$ [[4]]

\n

                    

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{trA}", "maxValue": "{trA}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{trB}", "maxValue": "{trB}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{trC}", "maxValue": "{trC}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{trD}", "maxValue": "{trD}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{trE}", "maxValue": "{trE}", "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"}, {"name": "Matrices: Basics 04", "extensions": [], "custom_part_types": [], "resources": [["question-resources/Tran_Mat.gif", "/srv/numbas/media/question-resources/Tran_Mat.gif"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}], "tags": [], "metadata": {"description": "Transpose of a matrix", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

The transpose of a matrix $A$ is a matrix where the rows of $A$ become the columns of the new matrix and the columns of $A$ become its rows. For example:

\n

$ A= \\left( \\begin{array}{ccc} 1 & 2 & 3 \\\\ 4 & 5 & 6\\ \\end{array} \\right)$          becomes          $ A^T= \\left(\\begin{array}{ccc} 1 & 4 \\\\ 2 & 5 \\\\ 3&6\\ \\end{array} \\right)$

\n

The resulting matrix is called the transposed matrix of $A$ and is denoted $A^T$.

", "advice": "

We are asked to work out the transpose of various matrices.

\n

The transpose process results in rows becoming columns and columns becomimng rows.

\n

It may help to imagine the matrix being \"filpped\" about its diagonal.

\n

\n

$A=\\var{A}$          $A^{T}=\\var{TA}$

\n

 

\n

 

\n

$B=\\var{B}$          $B^{T}=\\var{TB}$

\n

 

\n

\n

$C=\\var{C}$          $C^{T}=\\var{TC}$

\n

 

\n

 

\n

$D=\\var{D}$          $D^{T}=\\var{TD}$

\n

 

\n

$E=\\var{EE}$         $E^{T}=\\var{TE}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"m1": {"name": "m1", "group": "A", "definition": "random(1..2)", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "A", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n1),m1)))", "description": "", "templateType": "anything", "can_override": false}, "n2": {"name": "n2", "group": "B", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "m2": {"name": "m2", "group": "B", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "B", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n2),m2)))", "description": "", "templateType": "anything", "can_override": false}, "n3": {"name": "n3", "group": "C", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "m3": {"name": "m3", "group": "C", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "C", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n3),m3)))", "description": "", "templateType": "anything", "can_override": false}, "n4": {"name": "n4", "group": "D", "definition": "random(1..(n3-1) except n3)", "description": "", "templateType": "anything", "can_override": false}, "m4": {"name": "m4", "group": "D", "definition": "random(1..(m3-1) except m3)", "description": "", "templateType": "anything", "can_override": false}, "n1": {"name": "n1", "group": "A", "definition": "random(1..(m3-1) except m3)", "description": "", "templateType": "anything", "can_override": false}, "D": {"name": "D", "group": "D", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n4),m4)))", "description": "", "templateType": "anything", "can_override": false}, "n5": {"name": "n5", "group": "E", "definition": "m3", "description": "", "templateType": "anything", "can_override": false}, "m5": {"name": "m5", "group": "E", "definition": "n4", "description": "", "templateType": "anything", "can_override": false}, "EE": {"name": "EE", "group": "E", "definition": "transpose(matrix(repeat(repeat(random(-9..9),n5),m5)))", "description": "", "templateType": "anything", "can_override": false}, "TA": {"name": "TA", "group": "A", "definition": "transpose(A)", "description": "", "templateType": "anything", "can_override": false}, "TB": {"name": "TB", "group": "B", "definition": "transpose(B)", "description": "", "templateType": "anything", "can_override": false}, "TC": {"name": "TC", "group": "C", "definition": "transpose(C)", "description": "", "templateType": "anything", "can_override": false}, "TD": {"name": "TD", "group": "D", "definition": "transpose(D)", "description": "", "templateType": "anything", "can_override": false}, "TE": {"name": "TE", "group": "E", "definition": "transpose(EE)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "A", "variables": ["n1", "m1", "A", "TA"]}, {"name": "B", "variables": ["n2", "m2", "B", "TB"]}, {"name": "C", "variables": ["n3", "m3", "C", "TC"]}, {"name": "D", "variables": ["n4", "m4", "D", "TD"]}, {"name": "E", "variables": ["n5", "m5", "EE", "TE"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Give the transpose of each matrix below.

\n

You will have to define the dimension of the transposed matrix before you enter your answer.

\n

\n

$A=\\var{A}$               

\n

 

\n

$A^{T}=$ [[0]]

\n

 

\n

 

\n

$B=\\var{B}$               

\n

 

\n

$B^{T}=$ [[1]]

\n

 

\n

\n

$C=\\var{C}$               

\n

 

\n

$C^{T}=$ [[2]]

\n

 

\n

 

\n

$D=\\var{D}$               

\n

 

\n

$D^{T}=$ [[3]]

\n

 

\n

$E=\\var{EE}$               

\n

 

\n

$E^{T}=$ [[4]]

", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "TA", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "{TB}", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "{TC}", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "{TD}", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "matrix", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "correctAnswer": "{TE}", "correctAnswerFractions": false, "numRows": 1, "numColumns": 1, "allowResize": true, "tolerance": 0, "markPerCell": false, "allowFractions": false, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}], "extensions": [], "custom_part_types": [], "resources": [["question-resources/Tran_Mat.gif", "/srv/numbas/media/question-resources/Tran_Mat.gif"]]}