randRange(-2, 4, ROWS, COLS)
randRange(-2, 4, ROWS, COLS)
randFromArray(["+", "-"])
deepZipWith(2, function(a, b) {
if (OPERATION === "+") {
return a + b;
} else {
return a - b;
}
}, MAT_A, MAT_B)
matrixPad(SOLN_MAT, 3, 3)
BLUE
GREEN
PINK
printSimpleMatrix(MAT_A, MAT_A_COLOR)
printSimpleMatrix(MAT_B, MAT_B_COLOR)
printMatrix(function(a, b) {
a = colorMarkup(a, MAT_A_COLOR);
b = colorMarkup(b, MAT_B_COLOR);
return a + OPERATION + b;
}, MAT_A, MAT_B)
printSimpleMatrix(SOLN_MAT, SOLN_MAT_COLOR)
\Large{
PRETTY_MAT_A + OPERATION + PRETTY_MAT_B = {?}
}
To find the
sum
difference
of two matrices,
add
subtract
the corresponding items between each matrix.
\Large{PRETTY_HINT_MAT}
Now, simplify:
\Large{PRETTY_SOLN_MAT}