Jump to content

Kronecker product: Difference between revisions

m
changed the glyph for showing a matrix boundary.
m (added whitespace to the task's preamble and also before the TOC, changed ;See also: to ;Related task:.)
m (changed the glyph for showing a matrix boundary.)
Line 11:
Sample 1 (from Wikipedia):
<pre>
|1│1 2|2│ x |0│0 5|5│ = | 0 5 0 10|10│
|3│3 4|4│ |6│6 7|7│ | 6 7 12 14|14│
| 0 15 0 20|20│
|18│18 21 24 28|28│
</pre>
 
Sample 2:
<pre>
|0│0 1 0|0│ x |1│1 1 1 1|1│ = |0│0 0 0 0 1 1 1 1 0 0 0 0|0│
|1│1 1 1|1│ |1│1 0 0 1|1│ |0│0 0 0 0 1 0 0 1 0 0 0 0|0│
|0│0 1 0|0│ |1│1 1 1 1|1│ |0│0 0 0 0 1 1 1 1 0 0 0 0|0│
|1│1 1 1 1 1 1 1 1 1 1 1 1|1│
|1│1 0 0 1 1 0 0 1 1 0 0 1|1│
|1│1 1 1 1 1 1 1 1 1 1 1 1|1│
|0│0 0 0 0 1 1 1 1 0 0 0 0|0│
|0│0 0 0 0 1 0 0 1 0 0 0 0|0│
|0│0 0 0 0 1 1 1 1 0 0 0 0|0│
</pre>
See implementations and results below in JavaScript and PARI/GP languages.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.