{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Matrix Multiplication Practice" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " In this notebook you'll be able to practice matrix multiplication with randomly generated problems. Notice the special shapes that come up! You should encounter, as matrix-matrix multiplication, 8 problem types:\n", "\n", "
p
stores the answer to the problem you've generated, so use the p.show_answer()
code block to reveal the answer and the p.show_problem_type()
code block to reveal the problem type."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import generate_problems as gp\n",
"\n",
"p = gp.Problem()\n",
"p.new_MM()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"latex": [
"$$\\left[\\begin{matrix}4 & -1 & 3 & -1\\\\4 & -4 & 0 & 3\\\\2 & -3 & 3 & -2\\\\-2 & -1 & 1 & -2\\end{matrix}\\right] \\left[\\begin{matrix}-2\\\\-2\\\\-2\\\\-4\\end{matrix}\\right]=?$$"
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 1,
"text": [
"