// Numbas version: finer_feedback_settings {"name": "MA100 MT Week 6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

Week 6 (lectures 11 and 12): In this question, you will look at matrices. In particular, elementary matrices, the row reduced echelon form of a matrix, inverting an invertible matrix by using the adjoint matrix, and Cramer's rule.

\n

Please read the following before attempting the question:

\n

If you have not provided an answer to every input gap of a question or part of the question, and you try to submit your answers to the question or part, then you will see the message \"Can not submit answer - check for errors\". In reality your answer has been submitted, but the system is just concerned that you have not submitted an answer to every input gap. For this reason, please ensure that you provide an answer to every input gap in the question or part before submitting. Even if you are unsure of the answer, write down what you think is most likely to be correct; you can always change your answer or retry the question.

\n

As with all questions, there may be parts where you can choose to \"Show steps\". This may give a hint, or it may present sub-parts which will help you to solve that part of the question. Furthermore, remember to always press the \"Show feedback\" button at the end of each part. Sometimes, helpful feedback will be given here, and often it will depend on how correctly you have answered and will link to other parts of the question. Hence, always retry the parts until you obtain full marks, and then look at the feedback again.

Keep in mind that in order to see the feedback for a particular part of a question, you must provide a full (but not necessarily correct) answer to that part. Do not worry though, as you can look at the feedback and then ammend your answer accordingly.

Furthermore, as with all questions, choosing to reveal the answers will only show you the answers which change every time the question is loaded (i.e. answers to randomised questions); the fixed answers will not be revealed.

", "rulesets": {}, "variables": {"M3_Mult1": {"name": "M3_Mult1", "templateType": "anything", "description": "

Our third matrix will be a double row multiplication. This is the amount by which the \"first' row will be multiplied by.

", "group": "Variables for the third matrix in part a", "definition": "random(2..9)"}, "M2_1": {"name": "M2_1", "templateType": "anything", "description": "

This is an elementary matrix (Multiplying 1st row by M2_Mult).

", "group": "variables for second matrix in part a", "definition": "matrix([M2_Mult,0,0],[0,1,0], [0,0,1])"}, "M5_13": {"name": "M5_13", "templateType": "anything", "description": "

This is an elementary matrix of \"add a multiple of one row to another row\". We have added M5_Mult * row1 to row3.

", "group": "Variables for our matrix in part b", "definition": "matrix([1,0,0],[0,1,0],[M5_Mult,0,1])"}, "M1_2": {"name": "M1_2", "templateType": "anything", "description": "

This is an elementary matrix (swapped 1st and 3rd rows).

", "group": "Variables for first matrix in part a", "definition": "matrix([0,0,1],[0,1,0], [1,0,0])"}, "B1": {"name": "B1", "templateType": "anything", "description": "

In part e we have a linear system Ax=c. This is the first entry of the column vector c.

", "group": "Variables for part e", "definition": "random(1..9)"}, "b": {"name": "b", "templateType": "anything", "description": "

This is a constant in the matrix that we will present to the student.

", "group": "Variables for our matrix in part c", "definition": "random(1..5)"}, "d": {"name": "d", "templateType": "anything", "description": "

This is a constant in the matrix that we will present to the student.

", "group": "Variables for our matrix in part c", "definition": "random(1..5)"}, "M1_1": {"name": "M1_1", "templateType": "anything", "description": "

This is an elementary matrix (swapped 2nd and 3rd rows).

", "group": "Variables for first matrix in part a", "definition": "matrix([1,0,0],[0,0,1], [0,1,0])"}, "M_3_Det": {"name": "M_3_Det", "templateType": "anything", "description": "

This is the determinant of the matrix M_3.

", "group": "Variables for part e", "definition": "det(M_3)"}, "M7_22": {"name": "M7_22", "templateType": "anything", "description": "

This will be the (2,2) entry in our matrix M7.

", "group": "Variables for our matrix in part d", "definition": "random(-5..5 except(0))"}, "M7_13": {"name": "M7_13", "templateType": "anything", "description": "

This will be the (1,3) entry in our matrix M7.

", "group": "Variables for our matrix in part d", "definition": "random(-5..5 except(0))"}, "B3": {"name": "B3", "templateType": "anything", "description": "

In part e we have a linear system Ax=c. This is the third entry of the column vector c.

", "group": "Variables for part e", "definition": "random(1..9)"}, "M_2": {"name": "M_2", "templateType": "anything", "description": "

This is the matrix M_2 from part e.

", "group": "Variables for part e", "definition": "matrix([M7_11 , B1 , M7_13] , [M7_21 , B2 , 0] , [-1*M7_13*M7_22 , B3 , M7_11*M7_22])"}, "g": {"name": "g", "templateType": "anything", "description": "

This is a constant in the matrix that we will present to the student.

", "group": "Variables for our matrix in part c", "definition": "random(2..5)"}, "a": {"name": "a", "templateType": "anything", "description": "

This is a constant in the matrix that we will present to the student.

", "group": "Variables for our matrix in part c", "definition": "random(1..5)"}, "x": {"name": "x", "templateType": "anything", "description": "

This is the x solution in part e.

", "group": "Variables for part e", "definition": "M_1_Det / M7_Det"}, "M7_Adj": {"name": "M7_Adj", "templateType": "anything", "description": "

This is the adjoint matrix of M7.

", "group": "Variables for our matrix in part d", "definition": "transpose(M7_Cof)"}, "M7": {"name": "M7", "templateType": "anything", "description": "

This is our matrix for part d. The first and second rows are clearly linearly independent, and the third row is the vector product of the first two rows. Hence, all the rows are linearly independent and so the matrix is invertible.

", "group": "Variables for our matrix in part d", "definition": "matrix([M7_11 , 0 , M7_13] , [M7_21 , M7_22 , 0] , [-1*M7_13*M7_22 , M7_13*M7_21 , M7_11*M7_22])"}, "M1": {"name": "M1", "templateType": "anything", "description": "

This is our first elementary matrix. It is a row swap.

", "group": "Variables for first matrix in part a", "definition": "random(M1_1 , M1_2 , M1_3)"}, "M3_1": {"name": "M3_1", "templateType": "anything", "description": "

This is what is obtained after multiplying the 2nd row of the identity matrix by M3_Mult1, and the 3rd row by M3_Mult2.

", "group": "Variables for the third matrix in part a", "definition": "matrix([1,0,0],[0,M3_Mult1,0], [0,0,M3_Mult2])"}, "M_3": {"name": "M_3", "templateType": "anything", "description": "

This is the matrix M_3 from part e.

", "group": "Variables for part e", "definition": "matrix([M7_11 , 0 , B1] , [M7_21 , M7_22 , B2] , [-1*M7_13*M7_22 , M7_13*M7_21 , B3])"}, "M4_Mult": {"name": "M4_Mult", "templateType": "anything", "description": "

Our fourth matrix in part a is what we obatin after performing a row swap on the identity matrix, and then multiplying the unaffected row by a scalar (It is a 3x3 matrix). This is the scalar

", "group": "Variables for the fourth matrix in part a", "definition": "random(2..9)"}, "j": {"name": "j", "templateType": "anything", "description": "

This is a constant in the matrix that we will present to the student.

", "group": "Variables for our matrix in part c", "definition": "random(2..5)"}, "y": {"name": "y", "templateType": "anything", "description": "

This is the y solution in part e.

", "group": "Variables for part e", "definition": "M_2_Det / M7_Det"}, "c": {"name": "c", "templateType": "anything", "description": "

This is a constant in the matrix that we will present to the student.

", "group": "Variables for our matrix in part c", "definition": "random(1..5 except(b*f))"}, "M_1_Det": {"name": "M_1_Det", "templateType": "anything", "description": "

This is the determinant of the matrix M_1.

", "group": "Variables for part e", "definition": "det(M_1)"}, "M2_3": {"name": "M2_3", "templateType": "anything", "description": "

This is an elementary matrix (Multiplying 3rd row by M2_Mult).

", "group": "variables for second matrix in part a", "definition": "matrix([1,0,0],[0,1,0], [0,0,M2_Mult])"}, "M7_21": {"name": "M7_21", "templateType": "anything", "description": "

This will be the (2,1) entry in our matrix M7.

", "group": "Variables for our matrix in part d", "definition": "random(-5..5 except(0))"}, "M7_Cof": {"name": "M7_Cof", "templateType": "anything", "description": "

This is the cofactor matric of M7.

", "group": "Variables for our matrix in part d", "definition": "matrix([M7_11*(M7_22^2) , -1*M7_11*M7_21*M7_22 , M7_13*(M7_21^2 + M7_22^2)] , [(M7_13^2)*M7_21 , M7_22*(M7_11^2 + M7_13^2) , -1*M7_11*M7_13*M7_21] , [-1*M7_13*M7_22 , M7_13*M7_21 , M7_11*M7_22])"}, "M6": {"name": "M6", "templateType": "anything", "description": "

This is the matrix that we will present to the student in part c. It is designed so that its reduced-row-echelon (RRE) form has a row of zeroes at the bottom. This matrix always has positive integer-valued entries, and its RRE form has integer entries. This can easily be confirmed by its definition above.

", "group": "Variables for our matrix in part c", "definition": "matrix([a, a*b , a*c] , [a*g , a*b*g + d , a*c*g + d*f] , [a*h , a*b*h + d*j , a*c*h + d*f*j])"}, "M2_Mult": {"name": "M2_Mult", "templateType": "anything", "description": "

Our second elementary matrix will be a row multiplication. This is the amount by which the row will be multiplied by.

", "group": "variables for second matrix in part a", "definition": "random(2..9)"}, "M2": {"name": "M2", "templateType": "anything", "description": "

This is our second elementary matrix. It is a row multiplication.

", "group": "variables for second matrix in part a", "definition": "random(M2_1 , M2_2 , M2_3)"}, "M3": {"name": "M3", "templateType": "anything", "description": "

This is our third matrix. It is a double row multiplication.

", "group": "Variables for the third matrix in part a", "definition": "random(M3_1 , M3_2 , M3_3)"}, "M7_Min": {"name": "M7_Min", "templateType": "anything", "description": "

This is the minor matrix of M7.

", "group": "Variables for our matrix in part d", "definition": "matrix([M7_11*(M7_22^2) , M7_11*M7_21*M7_22 , M7_13*(M7_21^2 + M7_22^2)] , [-1*(M7_13^2)*M7_21 , M7_22*(M7_11^2 + M7_13^2) , M7_11*M7_13*M7_21] , [-1*M7_13*M7_22 , -1*M7_13*M7_21 , M7_11*M7_22])"}, "z": {"name": "z", "templateType": "anything", "description": "

This is the z solution in part e.

", "group": "Variables for part e", "definition": "M_3_Det / M7_Det"}, "M2_2": {"name": "M2_2", "templateType": "anything", "description": "

This is an elementary matrix (Multiplying 2nd row by M2_Mult).

", "group": "variables for second matrix in part a", "definition": "matrix([1,0,0],[0,M2_Mult,0], [0,0,1])"}, "M4_2": {"name": "M4_2", "templateType": "anything", "description": "

Our fourth matrix in part a is what we obatin after performing a row swap on the identity matrix, and then multiplying the unaffected row by a scalar (It is a 3x3 matrix). This is when the 1st and 3rd rows are swapped.

", "group": "Variables for the fourth matrix in part a", "definition": "matrix([0,0,1],[0,M4_Mult,0], [1,0,0])"}, "M5_32": {"name": "M5_32", "templateType": "anything", "description": "

This is an elementary matrix of \"add a multiple of one row to another row\". We have added M5_Mult * row3 to row2.

", "group": "Variables for our matrix in part b", "definition": "matrix([1,0,0],[0,1,M5_Mult],[0,0,1])"}, "M5_12": {"name": "M5_12", "templateType": "anything", "description": "

This is an elementary matrix of \"add a multiple of one row to another row\". We have added M5_Mult * row1 to row2.

", "group": "Variables for our matrix in part b", "definition": "matrix([1,0,0],[M5_Mult,1,0],[0,0,1])"}, "M3_Mult2": {"name": "M3_Mult2", "templateType": "anything", "description": "

Ourthirdmatrix will be a double row multiplication. This is the amount by which the \"first' row will be multiplied by.

", "group": "Variables for the third matrix in part a", "definition": "random(2..9)"}, "M5": {"name": "M5", "templateType": "anything", "description": "

This is our matrix for part b. It is an elementary matrix of \"add a multiple of one row to another row\".

", "group": "Variables for our matrix in part b", "definition": "random(M5_12 , M5_13 , M5_21 , M5_23 , M5_31 , M5_32)"}, "f": {"name": "f", "templateType": "anything", "description": "

This is a constant in the matrix that we will present to the student.

", "group": "Variables for our matrix in part c", "definition": "random(2..5)"}, "M5_23": {"name": "M5_23", "templateType": "anything", "description": "

This is an elementary matrix of \"add a multiple of one row to another row\". We have added M5_Mult * row2 to row3.

", "group": "Variables for our matrix in part b", "definition": "matrix([1,0,0],[0,1,0],[0,M5_Mult,1])"}, "h": {"name": "h", "templateType": "anything", "description": "

This is a constant in the matrix that we will present to the student.

", "group": "Variables for our matrix in part c", "definition": "random(2..5)"}, "M6_RRE": {"name": "M6_RRE", "templateType": "anything", "description": "

This is the RRE form of M6. Note that by our definition of the variable c, the value c-b*f will never be zero. This makes things easier for us (as far as marking is concerned) when we ask the student to solve a system of equations described by M6*x 0

", "group": "Variables for our matrix in part c", "definition": "matrix([1 , 0 , c - b*f] , [0 , 1 , f] , [0 , 0 , 0])"}, "M5_31": {"name": "M5_31", "templateType": "anything", "description": "

This is an elementary matrix of \"add a multiple of one row to another row\". We have added M5_Mult * row3 to row1.

", "group": "Variables for our matrix in part b", "definition": "matrix([1,0,M5_Mult],[0,1,0],[0,0,1])"}, "M_2_Det": {"name": "M_2_Det", "templateType": "anything", "description": "

This is the determinant of the matrix M_2.

", "group": "Variables for part e", "definition": "det(M_2)"}, "M4_3": {"name": "M4_3", "templateType": "anything", "description": "

Our fourth matrix in part a is what we obatin after performing a row swap on the identity matrix, and then multiplying the unaffected row by a scalar (It is a 3x3 matrix). This is when the 1st and 2nd rows are swapped.

", "group": "Variables for the fourth matrix in part a", "definition": "matrix([0,1,0],[1,0,0], [0,0,M4_Mult])"}, "M5_Mult": {"name": "M5_Mult", "templateType": "anything", "description": "

In part b we have a matrix that we want the student to find an inverse for. It is an elementary matrix of \"add a multiple of one row to another row\". This variable is the multiple (the scalar multiple).

", "group": "Variables for our matrix in part b", "definition": "random(2..9)"}, "M_1": {"name": "M_1", "templateType": "anything", "description": "

This is the matrix M_1 from part e.

", "group": "Variables for part e", "definition": "matrix([B1 , 0 , M7_13] , [B2 , M7_22 , 0] , [B3 , M7_13*M7_21 , M7_11*M7_22])"}, "M5_Inv": {"name": "M5_Inv", "templateType": "anything", "description": "

This is the inverse of M5. We have calculated it via short cut which does not work for all matrices. So be careful if you change any of the variables for this question.

", "group": "Variables for our matrix in part b", "definition": "-1*M5 + matrix([2,0,0],[0,2,0],[0,0,2])"}, "M4": {"name": "M4", "templateType": "anything", "description": "

This is our fourth matrix in part a. It is what we obatin after performing a row swap on the identity matrix, and then multiplying the unaffected row by a scalar (It is a 3x3 matrix).

", "group": "Variables for the fourth matrix in part a", "definition": "random(M4_1 , M4_2 , M4_3)"}, "M7_11": {"name": "M7_11", "templateType": "anything", "description": "

This will be the (1,1) entry in our matrix M7.

", "group": "Variables for our matrix in part d", "definition": "random(-5..5 except(0))"}, "M3_2": {"name": "M3_2", "templateType": "anything", "description": "

This is what is obtained after multiplying the 1st row of the identity matrix by M3_Mult1, and the 3rd row by M3_Mult2.

", "group": "Variables for the third matrix in part a", "definition": "matrix([M3_Mult1,0,0],[0,1,0], [0,0,M3_Mult2])"}, "M1_3": {"name": "M1_3", "templateType": "anything", "description": "

This is an elementary matrix (swapped 1st and 2nd rows).

", "group": "Variables for first matrix in part a", "definition": "matrix([0,1,0],[1,0,0], [0,0,1])"}, "M4_1": {"name": "M4_1", "templateType": "anything", "description": "

Our fourth matrix in part a is what we obatin after performing a row swap on the identity matrix, and then multiplying the unaffected row by a scalar (It is a 3x3 matrix). This is when the 2nd and 3rd rows are swapped.

", "group": "Variables for the fourth matrix in part a", "definition": "matrix([M4_Mult,0,0],[0,0,1], [0,1,0])"}, "B2": {"name": "B2", "templateType": "anything", "description": "

In part e we have a linear system Ax=c. This is the second entry of the column vector c.

", "group": "Variables for part e", "definition": "random(1..9)"}, "M7_Det": {"name": "M7_Det", "templateType": "anything", "description": "

This is the determinant of the matrix M7.

", "group": "Variables for our matrix in part d", "definition": "det(M7)"}, "M3_3": {"name": "M3_3", "templateType": "anything", "description": "

This is what is obtained after multiplying the 1st row of the identity matrix by M3_Mult1, and the 2nd row by M3_Mult2.

", "group": "Variables for the third matrix in part a", "definition": "matrix([M3_Mult1,0,0],[0,M3_Mult2,0], [0,0,1])"}, "M5_21": {"name": "M5_21", "templateType": "anything", "description": "

This is an elementary matrix of \"add a multiple of one row to another row\". We have added M5_Mult * row2 to row1.

", "group": "Variables for our matrix in part b", "definition": "matrix([1,M5_Mult,0],[0,1,0],[0,0,1])"}}, "name": "MA100 MT Week 6", "functions": {}, "extensions": [], "parts": [{"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "unitTests": [], "gaps": [{"scripts": {}, "minMarks": 0, "shuffleChoices": true, "variableReplacementStrategy": "originalfirst", "warningType": "none", "maxMarks": 0, "minAnswers": 0, "showCorrectAnswer": true, "choices": ["

$\\var{{M1}}$

", "

$\\var{{M2}}$

", "

$\\var{{M3}}$

", "

$\\var{{M4}}$

"], "maxAnswers": 0, "matrix": [["1", 0], ["1", 0], [0, "1"], [0, "1"]], "marks": 0, "showFeedbackIcon": true, "answers": ["

Elementary

", "

Not elementary

"], "unitTests": [], "layout": {"type": "all", "expression": ""}, "customMarkingAlgorithm": "", "type": "m_n_x", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "displayType": "radiogroup", "shuffleAnswers": true}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 0, "sortAnswers": false, "prompt": "

Which of the following matrices are elementary matrices?

\n

[[0]]

"}, {"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "unitTests": [], "gaps": [{"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "numRows": "3", "allowFractions": false, "correctAnswer": "M5_Inv", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowResize": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "markPerCell": false, "marks": 1, "correctAnswerFractions": false, "unitTests": [], "variableReplacements": [], "numColumns": "3", "tolerance": 0}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 0, "sortAnswers": false, "prompt": "

Find the inverse of the elementary matrix $M = \\var{{M5}}$.

\n

$M^{-1} =$ [[0]] .

"}, {"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "unitTests": [], "gaps": [{"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "numRows": "3", "allowFractions": true, "correctAnswer": "M6_RRE", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowResize": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "markPerCell": false, "marks": "3", "correctAnswerFractions": true, "unitTests": [], "variableReplacements": [], "numColumns": "3", "tolerance": 0}, {"showFeedbackIcon": true, "scripts": {}, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "unitTests": [], "failureRate": 1, "checkingAccuracy": 0.001, "type": "jme", "checkVariableNames": false, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "showPreview": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 1, "expectedVariableNames": [], "answer": "({b}*{f} - {c})*t", "checkingType": "absdiff", "vsetRange": [0, 1]}, {"showFeedbackIcon": true, "scripts": {}, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "unitTests": [], "failureRate": 1, "checkingAccuracy": 0.001, "type": "jme", "checkVariableNames": false, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "showPreview": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 1, "expectedVariableNames": [], "answer": "-{f}*t", "checkingType": "absdiff", "vsetRange": [0, 1]}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 0, "sortAnswers": false, "prompt": "

Find the reduced row echelon form of the matrix $N = \\var{{M6}}$.

\n

$\\text{RRE} (N) =$ [[0]] .

\n

Hence, solve the system $\\var{{M6}} \\begin{pmatrix} x \\\\ y \\\\ z \\end{pmatrix} = \\begin{pmatrix} 0 \\\\ 0 \\\\ 0 \\end{pmatrix}$. (There will be one free variable which you should express by using the letter $t$, and let $z$ play the role of the free variable (i.e. $z=t$). This is demonstarted below. (As usual, if you want to write something like $6t$ then please write 6*t and not 6t, as the system may not correctly interpret the latter.)

\n

$x=$ [[1]] .
$y=$ [[2]] .
$z=t$.

"}, {"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "unitTests": [], "gaps": [{"showFeedbackIcon": true, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "minValue": "M7_Det", "mustBeReduced": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 1, "maxValue": "M7_Det", "unitTests": [], "correctAnswerFraction": false}, {"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "numRows": "3", "allowFractions": false, "correctAnswer": "M7_Min", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowResize": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "markPerCell": false, "marks": 1, "correctAnswerFractions": false, "unitTests": [], "variableReplacements": [], "numColumns": "3", "tolerance": 0}, {"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "numRows": "3", "allowFractions": false, "correctAnswer": "M7_Cof", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowResize": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "markPerCell": false, "marks": 1, "correctAnswerFractions": false, "unitTests": [], "variableReplacements": [], "numColumns": "3", "tolerance": 0}, {"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "numRows": "3", "allowFractions": false, "correctAnswer": "M7_Adj", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowResize": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "markPerCell": false, "marks": 1, "correctAnswerFractions": false, "unitTests": [], "variableReplacements": [], "numColumns": "3", "tolerance": 0}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "stepsPenalty": 0, "marks": 0, "sortAnswers": false, "prompt": "

In this part of the question, we will use the method of the adjoint matrix to find the inverse of a matrix. This is described in chapter 12 of the lecture notes. A short explanation is given if you press the \"Show steps\" button below.

\n

Consider the matrix $B = \\var{{M7}}$. What is the determinant of this matrix?

\n

$\\det (B) =$ [[0]] .

\n

Since the determinant is non-zero, we can see that $B$ is invertible. What is the matrix of minors of $B$?

\n

$B_{\\text{Min}} =$ [[1]] .

\n

Now we can find the matrix of cofactors of $B$.

\n

$B_{\\text{Cof}} =$ [[2]] .

\n

Finally, we can find the adjoint matrix of $B$.

\n

$B_{\\text{Adj}} =$ [[3]] .

\n

Hence, the iverse of the matrix $B$ is $B^{-1} = \\frac{1}{\\det (B)} B_{\\text{Adj}} =\\big($ [[0]] $\\big)^{-1}$ [[3]] .

", "steps": [{"showFeedbackIcon": true, "scripts": {}, "type": "information", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "marks": 0, "unitTests": [], "showCorrectAnswer": true, "prompt": "

Suppose we have an $n \\times n$ matrix $A$. If we remove the $i^{\\text{th}}$ row and $j^{\\text{th}}$ column, then we are left with an $(n-1) \\times (n-1)$ matrix. The determinant of this $(n-1) \\times (n-1)$ matrix is called the $(i,j)$ minor of $A$, which we denote by $M_{ij}$.

\n

The $(i,j)$ cofactor of A is denoted by $C_{ij}$, and is defined by $C_{ij} = (-1)^{i+j} M_{ij}$.

\n

The matrix of minors of $A$ is the $n \\times n$ matrix which has $(i,j)$ entry equal to $M_{ij}$. It is denoted by $A_{\\text{Min}}$.

\n

The matrix of cofactors of $A$ is the $n \\times n$ matrix which has $(i,j)$ entry equal to $C_{ij}$. It is denoted by $A_{\\text{Cof}}$.

\n

The adjoint matrix of $A$ is denoted by $A_{\\text{Adj}}$, and it is defined to be the transpose of the matrix of cofactors of $A$. That is, $A_{\\text{Adj}} = {A_{\\text{Cof}}}^{\\text{T}}$.

\n

Why is all this important, you may ask? Well, one can show that if the matrix $A$ is invertible, then its inverse is equal to $A^{-1} = \\frac{1}{\\det(A)} A_{\\text{Adj}}$.

"}], "variableReplacements": []}, {"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "unitTests": [], "gaps": [{"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "numRows": "3", "allowFractions": false, "correctAnswer": "M_1", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowResize": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "markPerCell": false, "marks": "0.5", "correctAnswerFractions": false, "unitTests": [], "variableReplacements": [], "numColumns": "3", "tolerance": 0}, {"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "numRows": "3", "allowFractions": false, "correctAnswer": "M_2", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowResize": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "markPerCell": false, "marks": "0.5", "correctAnswerFractions": false, "unitTests": [], "variableReplacements": [], "numColumns": "3", "tolerance": 0}, {"showFeedbackIcon": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "numRows": "3", "allowFractions": true, "correctAnswer": "M_3", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "allowResize": false, "type": "matrix", "extendBaseMarkingAlgorithm": true, "markPerCell": false, "marks": "0.5", "correctAnswerFractions": false, "unitTests": [], "variableReplacements": [], "numColumns": "3", "tolerance": 0}, {"showFeedbackIcon": true, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "minValue": "M_1_Det", "mustBeReduced": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 1, "maxValue": "M_1_Det", "unitTests": [], "correctAnswerFraction": false}, {"showFeedbackIcon": true, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "minValue": "M_2_Det", "mustBeReduced": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 1, "maxValue": "M_2_Det", "unitTests": [], "correctAnswerFraction": false}, {"showFeedbackIcon": true, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "allowFractions": false, "minValue": "M_3_Det", "mustBeReduced": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": 1, "maxValue": "M_3_Det", "unitTests": [], "correctAnswerFraction": false}, {"showFeedbackIcon": true, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "allowFractions": true, "minValue": "x", "mustBeReduced": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": "0.5", "maxValue": "x", "unitTests": [], "correctAnswerFraction": true}, {"showFeedbackIcon": true, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "allowFractions": true, "minValue": "y", "mustBeReduced": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": "0.5", "maxValue": "y", "unitTests": [], "correctAnswerFraction": true}, {"showFeedbackIcon": true, "scripts": {}, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "allowFractions": true, "minValue": "z", "mustBeReduced": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "numberentry", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "marks": "0.5", "maxValue": "z", "unitTests": [], "correctAnswerFraction": true}], "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "gapfill", "extendBaseMarkingAlgorithm": true, "stepsPenalty": 0, "marks": 0, "sortAnswers": false, "prompt": "

Let $B= \\var{{M7}}$. This is the same matrix as in part d. 

\n

Consider the system of linear equations described by $B \\boldsymbol{x} = \\boldsymbol{c}$ where $\\boldsymbol{x} = \\begin{pmatrix}x \\\\ y \\\\ z \\end{pmatrix}$ and $\\boldsymbol{c} = \\begin{pmatrix} \\var{{B1}} \\\\ \\var{{B2}} \\\\ \\var{{B3}} \\end{pmatrix}$.

\n

We established in part d that $B$ is invertible, and hence this system has a unique solution, namely $B^{-1} \\boldsymbol{c}$. This is easy for us to calculate as we obtained $B^{-1}$ in part d. However, in this part of the question we want to find the solution using a different method: Cramer's method.

\n

Section 12.5 of the lecture notes explains Cramer's method and gives an example. We recommend you have a look at this before continuing with this question. Press the \"Show steps\" button below for a short explanation.

\n

First, let us write the matrices that we obtain by replacing the $i^{\\text{th}}$ column of $B$ with the column vector $\\boldsymbol{c}$, which we denote by $B_i$. We will do this for $i=1,2,$ and $3$.

\n

$B_1 = $ [[0]] .
$B_2 = $ [[1]] .
$B_3 = $ [[2]] .

\n

Now let us calculate the corresponding determinants.

\n

$\\det (B_1 )= $ [[3]] .
$\\det (B_2 )= $ [[4]] .
$\\det (B_3 )= $ [[5]] .

\n

Hence, the solution to our system of equations is given by
(Note that you calculated $\\det (B)$ in part d.)

\n

$x = \\frac{\\det (B_1)}{\\det (B)} =$ [[6]] .
$y = \\frac{\\det (B_2)}{\\det (B)} =$ [[7]] .
$z = \\frac{\\det (B_3)}{\\det (B)} =$ [[8]] .

", "steps": [{"showFeedbackIcon": true, "scripts": {}, "type": "information", "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "marks": 0, "unitTests": [], "showCorrectAnswer": true, "prompt": "

Let $A$ be an $n \\times n$, real-valued matrix which is invertible. Let $\\boldsymbol{b}$ be an $n \\times 1$, real-valued column vector, and let $\\boldsymbol{x} = \\begin{pmatrix}x_1 \\\\ x_2 \\\\ \\vdots \\\\x_n \\end{pmatrix}$ represent our unknowns. Suppose we have a system of linear equations described by $A \\boldsymbol{x} = \\boldsymbol{b}$.

\n

For $i = 1,2, \\ldots n$ let $A_i$ be the matrix obtained by replacing the $i^{\\text{th}}$ column of $A$ with the column vector $\\boldsymbol{b}$. Cramer's rule tells us that the solution to the system of equations, $A \\boldsymbol{x} = \\boldsymbol{b}$, is given by

\n

$x_1 = \\frac{\\det (A_1)}{\\det (A)}$,
$x_2 = \\frac{\\det (A_2)}{\\det (A)}$,
$\\vdots$
$x_n = \\frac{\\det (A_n)}{\\det (A)}$.

"}], "variableReplacements": []}], "preamble": {"css": "", "js": ""}, "tags": [], "metadata": {"description": "

This is the question for week 6 of the MA100 course at the LSE. It looks at material from chapters 11 and 12.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "variable_groups": [{"name": "Variables for first matrix in part a", "variables": ["M1_1", "M1_2", "M1_3", "M1"]}, {"name": "variables for second matrix in part a", "variables": ["M2_Mult", "M2_1", "M2_2", "M2_3", "M2"]}, {"name": "Variables for the third matrix in part a", "variables": ["M3_Mult1", "M3_Mult2", "M3_1", "M3_2", "M3_3", "M3"]}, {"name": "Variables for the fourth matrix in part a", "variables": ["M4_Mult", "M4_1", "M4_2", "M4_3", "M4"]}, {"name": "Variables for our matrix in part b", "variables": ["M5_Mult", "M5_12", "M5_13", "M5_21", "M5_23", "M5_31", "M5_32", "M5", "M5_Inv"]}, {"name": "Variables for our matrix in part c", "variables": ["a", "b", "c", "d", "f", "g", "h", "j", "M6", "M6_RRE"]}, {"name": "Variables for our matrix in part d", "variables": ["M7_11", "M7_13", "M7_21", "M7_22", "M7", "M7_Min", "M7_Cof", "M7_Adj", "M7_Det"]}, {"name": "Variables for part e", "variables": ["B1", "B2", "B3", "M_1", "M_2", "M_3", "M_1_Det", "M_2_Det", "M_3_Det", "x", "y", "z"]}], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "", "ungrouped_variables": [], "type": "question", "contributors": [{"name": "Michael Yiasemides", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1440/"}]}]}], "contributors": [{"name": "Michael Yiasemides", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1440/"}]}