← Course overview and all lessons

Lesson 5 of 23 · 3:05

Expressions first, values second

Evaluate an expression-valued LM and distinguish it from a numeric CM.

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 · What changes when a matrix holds formulas?
  2. 0:26 · Build an expression column and row
  3. 0:45 · Write all four expressions
  4. 1:02 · Choose the positive assignment
  5. 1:18 · Evaluate the first row
  6. 1:31 · Evaluate the second row
  7. 1:50 · A different LM gives a different operator
  8. 2:09 · Your turn: evaluate an off-diagonal cell
  9. 2:31 · Answer: agreement on the diagonal
  10. 2:47 · Keep the two layers separate

Complete transcript

This transcript includes the answers to prediction prompts.

Show transcript

What changes when a matrix holds formulas? · 0:00

What changes when a matrix holds formulas? A numeric C M stores finished answers: zero or one. A logical matrix, or L M, stores expressions that still need values for their variables. We will build those expression-valued cells, evaluate them under one consistent assignment, and learn to distinguish the symbolic matrix from its numeric result.

Build an expression column and row · 0:26

Place X and not X in a column. Place Y and not Y in a row. Here not reverses a Boolean value. Multiplication in this logical construction means AND: both factors must be true for the product to be true.

Write all four expressions · 0:45

Their outer product gives four expressions. The top-left cell is X and Y. The top-right is X and not Y. The bottom row uses not X instead. We write M sub X Y equals this whole two-by-two logical matrix.

Choose the positive assignment · 1:02

For the positive assignment used here, set the original variables X and Y to one. Then not X and not Y become zero. Apply that same assignment to every expression. We are evaluating one symbolic object consistently, cell by cell.

Evaluate the first row · 1:18

The top-left expression becomes one and one, which is one. The top-right becomes one and zero, which is zero. Notice that the written expressions stay different even though we gave the original variables the same value.

Evaluate the second row · 1:31

Both bottom expressions contain not X, now zero, so both evaluate to zero. The resulting numeric matrix is the AND operator in true-first order. The paper describes this relationship as taking the positive valuation of the logical matrix.

A different LM gives a different operator · 1:50

To represent equivalence, start from the equivalence logical matrix shown here. Its diagonal entries test agreement. Its off-diagonal entries test exclusive-or. We changed the expressions before evaluating them; valuation alone did not change AND into equivalence.

Your turn: evaluate an off-diagonal cell · 2:09

Again set X and Y to one. What does the upper-right exclusive-or expression evaluate to? And what does an equivalence expression on the diagonal evaluate to? Work out those two cases before viewing the completed matrix.

Prediction pause: 8 seconds.

Answer: agreement on the diagonal · 2:31

Exclusive-or is zero because the inputs agree. Equivalence is one for the same reason. So the diagonal entries become one and the other entries become zero. The original expressions determine which operator the valuation produces.

Keep the two layers separate · 2:47

You now have two useful layers: expressions while constructing a logical matrix, and bits after evaluating it. Next we will combine two complete logical matrices. Keeping their names and their entries separate will make that larger construction much easier to read.