# Khan/khan-exercises

Add hints for matrix determinant exercises & split up 2x2 and 3x3 int…

…o separate files.

Summary: It is what it is.

Test Plan: Tested locally

Reviewers: eater, alpert

Reviewed By: eater

Differential Revision: http://phabricator.khanacademy.org/D2018
1 parent 7e20aa4 commit 2654ea6de8f31cb1d7bed014f43918b2cba2fc85 Stephanie H. Chang committed Feb 9, 2013
 @@ -2,7 +2,7 @@ - Matrix determinant + Determinant of a 2x2 matrix @@ -24,33 +24,42 @@ What is the determinant of PRETTY_MAT_ID?

-
-
-

The solution is:

- \text{det}(PRETTY_MAT_ID) = SOLN -
-
-
SOLN
-
+
2 + makeMatrix([["a","b"],["c","d"]])
-
-
-
-
- -
-
- 3 -
-
-
+
+
+

+ The determinant of a 2x2 matrix can be computed the following way: +

+

+ + printSimpleMatrixDet(HINT_MAT) + = matrix2x2DetHint(HINT_MAT) + +

+
+
+

In this specific case,

+

+ + printSimpleMatrixDet(MAT) + = matrix2x2DetHint(MAT) + +

+
+
+ + = SOLN + +
 @@ -0,0 +1,69 @@ + + + + + Determinant of a 2x2 matrix + + + +
+ +
+ makeMatrix(randRange(-2, 5, DIM, DIM)) + matrixDet(MAT) + "\\textbf " + randFromArray("ABCDEF") +
+ +
+

+ PRETTY_MAT_ID = printSimpleMatrix(MAT) +

+
+ +

+ What is the determinant of PRETTY_MAT_ID? +

+ +
+ SOLN +
+ +
+
+
+ 2 + makeMatrix([["a","b"],["c","d"]]) +
+
+
+

+ The determinant of a 2x2 matrix can be computed the following way: +

+

+ + printSimpleMatrixDet(HINT_MAT) + = matrix2x2DetHint(HINT_MAT) + +

+
+
+

In this specific case,

+

+ + printSimpleMatrixDet(MAT) + = matrix2x2DetHint(MAT) + +

+
+
+ + = SOLN + +
+
+
+
+ +
+ +
 @@ -0,0 +1,52 @@ + + + + + Determinant of a 2x2 matrix + + + +
+ +
+ makeMatrix(randRange(-2, 5, DIM, DIM)) + matrixDet(MAT) + "\\textbf " + randFromArray("ABCDEF") +
+ +
+

+ PRETTY_MAT_ID = printSimpleMatrix(MAT) +

+
+ +

+ What is the determinant of PRETTY_MAT_ID? +

+ +
+ SOLN +
+ +
+
+
+ 2 + makeMatrix([["a","b"],["c","d"]]) +
+
+
+
+ + det(PRETTY_MAT_ID) + = printSimpleMatrixDet(MAT) + = SOLN + +
+
+
+
+ +
+ +
 @@ -0,0 +1,81 @@ + + + + + Determinant of a 3x3 matrix + + + +
+ +
+ makeMatrix(randRange(-2, 5, DIM, DIM)) + matrixDet(MAT) + "\\textbf " + randFromArray("ABCDEF") +
+ +
+

+ PRETTY_MAT_ID = printSimpleMatrix(MAT) +

+
+ +

+ What is the determinant of PRETTY_MAT_ID? +

+ +
+ SOLN +
+ +
+
+
+ 3 + makeMatrix([["a","b","c"],["d","e","f"],["g","h","i"]]) +
+
+
+

The determinant of any 3x3 matrix can be computed the following way:

+

+ + printSimpleMatrixDet(HINT_MAT) + = matrix3x3DetHint(HINT_MAT, true) + +

+
+
+

+ + = matrix3x3DetHint(HINT_MAT) + +

+
+
+

In this specific case,

+

+ + printSimpleMatrixDet(MAT) + = matrix3x3DetHint(MAT, true) + +

+
+
+

+ + = matrix3x3DetHint(MAT) + +

+
+
+ + = SOLN + +
+
+
+
+ +
+ +
 @@ -0,0 +1,52 @@ + + + + + Determinant of a 3x3 matrix + + + +
+ +
+ makeMatrix(randRange(-2, 5, DIM, DIM)) + matrixDet(MAT) + "\\textbf " + randFromArray("ABCDEF") +
+ +
+

+ PRETTY_MAT_ID = printSimpleMatrix(MAT) +

+
+ +

+ What is the determinant of PRETTY_MAT_ID? +

+ +
+ SOLN +
+ +
+
+
+ 3 + makeMatrix([["a","b","c"],["d","e","f"],["g","h","i"]]) +
+
+
+
+ + det(PRETTY_MAT_ID) + = printSimpleMatrixDet(MAT) + = SOLN + +
+
+
+
+ +
+ +