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.376, 0.932, 0.671, 0.773];
v = [0.574, 0.057, 0.876, 0.296];
a = 3;
b = 8;
1
2
3
4
5
6
import numpy as np

u = np.array([0.376, 0.932, 0.671, 0.773])
v = np.array([0.574, 0.057, 0.876, 0.296])
a = 3
b = 8
1
2
3
4
5
6
from sympy import *

u = Matrix([0.376, 0.932, 0.671, 0.773])
v = Matrix([0.574, 0.057, 0.876, 0.296])
a = 3
b = 8

Correct answer

${\bf w} = $ [5.180 0.5144 7.905 2.671; 12.84 1.275 19.59 6.621; 9.244 0.9179 14.11 4.767; 10.65 1.057 16.25 5.491]

${\bf w} = $ [[5.180, 0.5144, 7.905, 2.671], [12.84, 1.275, 19.59, 6.621], [9.244, 0.9179, 14.11, 4.767], [10.65, 1.057, 16.25, 5.491]]

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-08-04 20:43:22 (CDT)
Duration:
0s
Show/Hide answer
{
  "w": {
    "_type": "ndarray",
    "_dtype": "float64",
    "_value": [
      [
        5.179776,
        0.514368,
        7.905024000000001,
        2.671104
      ],
      [
        12.839232,
        1.274976,
        19.594368000000003,
        6.620928
      ],
      [
        9.243695999999998,
        0.917928,
        14.107104,
        4.7667839999999995
      ],
      [
        10.648848,
        1.057464,
        16.251552,
        5.491391999999999
      ]
    ]
  }
}
History
dec frac
rad deg