← Course overview and all lessons

Lesson 17 of 23 · 3:00

Generalize the tensor construction

Generalize tensors by tracking factors, axis order and assignment count.

Keyboard: focus the player, then Space or K to play/pause and arrow keys to seek. Tab moves through the controls. Selectable captions replace the video's caption strip with the same timed text below.

In this lesson

  1. 0:00 · How do larger tensors keep their addresses?
  2. 0:24 · Recall one two-variable factor
  3. 0:41 · Read the full four-by-four result
  4. 1:00 · Add one more complete factor
  5. 1:21 · Zoom into one addressed entry
  6. 1:43 · Separate conjunction basis from a general rule
  7. 2:03 · Count dimensions with paired inputs
  8. 2:19 · Your turn: eight variables
  9. 2:44 · Answer: sixteen by sixteen

Complete transcript

This transcript includes the answers to prediction prompts.

Show transcript

How do larger tensors keep their addresses? · 0:00

How do larger tensors keep their addresses? Two independent Boolean variables give four assignments in a two-by-two matrix. Four give sixteen in a four-by-four, and six give sixty-four in an eight-by-eight. We will track the complete tensor factors, row and column groups, and assignment count so that each larger cell keeps its meaning.

Recall one two-variable factor · 0:24

For the conjunction W and X, the logical matrix is ket W times bra X. Its row components are W and not W; its columns are X and not X. A second factor for Y and Z follows the same pattern. Both complete factors are shown before we tensor them.

Read the full four-by-four result · 0:41

The tensor row index combines W and Y; the column index combines X and Z. Each entry conjoins one expression from each factor. The upper-right cell contains W, not X, Y, not Z. Read the labelled components to see why each literal belongs there.

Add one more complete factor · 1:00

Add the E F logical matrix to a tensor already containing A B and C D. Each dimension doubles. The rows now index A, C, E, and the columns index B, D, F. The displayed eight-by-eight overview shows the structure; we will enlarge one addressed entry next.

Zoom into one addressed entry · 1:21

Choose row components one, zero, one and column components zero, one, zero. Those choices specify A true, C false, E true, and B false, D true, F false. Interleave them in the original variable order to get A, not B, not C, D, E, not F.

Separate conjunction basis from a general rule · 1:43

The tensor shown is a conjunction basis LM. A general Boolean rule chooses a combination of basis matrices according to its truth values. For example, ANDing the three pairwise XOR rules uses the tensor of their numeric XOR CMs. Other outer operators require their own combination rule.

Count dimensions with paired inputs · 2:03

For two n independent input bits split evenly, there are n row bits and n column bits. That gives two to the n rows and two to the n columns. If the split is unequal, a rectangular matrix is equally valid; the complete assignment count is unchanged.

Your turn: eight variables · 2:19

Continue the alternating grouping with eight independent bits, A through H. Which variables index the rows? How many rows and columns are needed for an even split? Predict the shape before considering any particular Boolean operator.

Prediction pause: 10 seconds.

Answer: sixteen by sixteen · 2:44

The row bits are A, C, E, G; the column bits are B, D, F, H. Four bits on each axis require sixteen positions, giving two hundred fifty-six cells. Next we will transform a larger matrix while keeping its assignment mapping correct.