You are viewing this question as it will appear in the manual grading interface. Return to the normal view when you are done.

Template pl-matrix-input: Matrix algebra

Two matrices $A$ and $B$ are given as follows:

1
2
A = [0.60 0.80 1.00 1.00; -0.50 1.00 -0.20 0.90; -0.70 -0.10 1.00 -0.50];
B = [-0.80 -0.70 0.50; -0.10 -1.00 0.00; 0.20 -0.60 -0.40; 1.00 0.60 0.10];
1
2
A = {{0.60, 0.80, 1.00, 1.00}, {-0.50, 1.00, -0.20, 0.90}, {-0.70, -0.10, 1.00, -0.50}};
B = {{-0.80, -0.70, 0.50}, {-0.10, -1.00, 0.00}, {0.20, -0.60, -0.40}, {1.00, 0.60, 0.10}};
1
2
3
4
import numpy as np

A = np.array([[0.60, 0.80, 1.00, 1.00], [-0.50, 1.00, -0.20, 0.90], [-0.70, -0.10, 1.00, -0.50]])
B = np.array([[-0.80, -0.70, 0.50], [-0.10, -1.00, 0.00], [0.20, -0.60, -0.40], [1.00, 0.60, 0.10]])
1
2
A = matrix(c(0.60, 0.80, 1.00, 1.00, -0.50, 1.00, -0.20, 0.90, -0.70, -0.10, 1.00, -0.50), nrow = 3, ncol = 4, byrow = TRUE)
B = matrix(c(-0.80, -0.70, 0.50, -0.10, -1.00, 0.00, 0.20, -0.60, -0.40, 1.00, 0.60, 0.10), nrow = 4, ncol = 3, byrow = TRUE)
1
2
3
4
from sympy import *

A = Matrix([[0.60, 0.80, 1.00, 1.00], [-0.50, 1.00, -0.20, 0.90], [-0.70, -0.10, 1.00, -0.50]])
B = Matrix([[-0.80, -0.70, 0.50], [-0.10, -1.00, 0.00], [0.20, -0.60, -0.40], [1.00, 0.60, 0.10]])

Find the product of these two matrices:

Correct answer

$AB=$ [0.640 -1.22 -0.0000000000000000278; 1.16 0.01000 -0.0800; 0.270 -0.310 -0.800]

$AB=$ [[0.640, -1.22, -0.0000000000000000278], [1.16, 0.01000, -0.0800], [0.270, -0.310, -0.800]]

Student view placeholder

In student views this area is used for assessment and score info.
Tools

Staff information

Question

Title:
Template pl-matrix-input: Matrix algebra

Variant

Started at:
2026-08-04 21:53:10 (CDT)
Duration:
0s
Show/Hide answer
{
  "C": {
    "_type": "ndarray",
    "_dtype": "float64",
    "_value": [
      [
        0.6400000000000001,
        -1.2199999999999998,
        -2.7755575615628914e-17
      ],
      [
        1.1600000000000001,
        0.009999999999999967,
        -0.07999999999999997
      ],
      [
        0.27,
        -0.31,
        -0.8
      ]
    ]
  }
}
History
dec frac
rad deg