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

Compute the outer product

Given the vectors $\bf{u}$ and $\bf{v}$, and the scalars $\textrm{a}$ and $\textrm{b}$, compute the outer product ${\bf w} = \textrm{a} {\bf u} \otimes \textrm{b} {\bf v}$

1
2
3
4
u = [0.154, 0.028, 0.037, 0.874];
v = [0.168, 0.670, 0.575, 0.640];
a = 1;
b = 6;
1
2
3
4
5
6
import numpy as np

u = np.array([0.154, 0.028, 0.037, 0.874])
v = np.array([0.168, 0.670, 0.575, 0.640])
a = 1
b = 6
1
2
3
4
5
6
from sympy import *

u = Matrix([0.154, 0.028, 0.037, 0.874])
v = Matrix([0.168, 0.670, 0.575, 0.640])
a = 1
b = 6

Correct answer

${\bf w} = $ [0.1552 0.6191 0.5313 0.5914; 0.02822 0.1126 0.09660 0.1075; 0.03730 0.1487 0.1276 0.1421; 0.8810 3.513 3.015 3.356]

${\bf w} = $ [[0.1552, 0.6191, 0.5313, 0.5914], [0.02822, 0.1126, 0.09660, 0.1075], [0.03730, 0.1487, 0.1276, 0.1421], [0.8810, 3.513, 3.015, 3.356]]

Student view placeholder

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

Staff information

Question

Title:
Compute the outer product

Variant

Started at:
2026-09-19 08:05:23 (CDT)
Duration:
0s
Show/Hide answer
{
  "w": {
    "_type": "ndarray",
    "_dtype": "float64",
    "_value": [
      [
        0.155232,
        0.6190800000000001,
        0.5313,
        0.59136
      ],
      [
        0.028224,
        0.11256000000000002,
        0.09659999999999999,
        0.10752
      ],
      [
        0.037295999999999996,
        0.14874,
        0.12764999999999999,
        0.14207999999999998
      ],
      [
        0.880992,
        3.5134800000000004,
        3.0153,
        3.35616
      ]
    ]
  }
}
History
dec frac
rad deg