# Boolean algebra: why does the distributive property not make intuitive mathematical sense?

I'm trying to understand the distributive law of Boolean algebra by relating it to what I know from ordinary algebra, and it seems to only work for one form of the law.

Ordinary algebra:

$$x(y+z) = xy + xz$$

This holds true for the first part of the distributive law.

Ordinary algebra:

$$x + (yz)$$

It's just that. I don't see any way of simplifying this more.

But in Boolean Algebra:

$$x + (yz) = x\vee (y \wedge z) = (x\vee y) \wedge (x\vee z) = (x+y)(x+z)$$

And in ordinary algebra, if you expand this, it's:

$$xx+xz+xy+yz$$

Could someone please help me understand this? Am I wrong in trying to relate ordinary algebra to Boolean algebra? Subquestion: if I am wrong in trying to make this connection, why?

• Where is the problem here? A different algebra is sure to have different properties. May 19, 2018 at 16:57
• But in ordinary algebra it is not true that : $x+(yz)=(x+y)(x+z)$. May 19, 2018 at 16:57
• So? In Boolean algebra, it is true. Mind you, the results you find in one algebra are not the results of another algebra. You can't just take a result from boolean and expect it to match elsewhere. May 19, 2018 at 16:57
• The other distributive law in Boolean algebra does make sense if you interpret $+$ and $\times$ as "or" and "and" rather than as operations on numbers. May 19, 2018 at 16:59
• The trick is that in boolean algebra the variables $x,y,z$ can have only two values : $0$ and $1$. Thus, e.g. $1+(1.1)=1+1=1=1+1=(1+1)(1+1)$. In arithmetic, we have $1+1 \ne 1$. May 19, 2018 at 17:00

A simple answer to your question is that Boolean algebra is not the same thing as 'ordinary' algebra (arithmetic). The intuition that connects $+$ with $\vee$ and $\times$ with $\wedge$ really is just intuition: the laws of addition and multiplication of numbers do not exactly coincide with the laws of the join and meet operations, and there's no reason to expect them to do so.

But there is a connection that can be made, which is if work with the integers modulo $2$, i.e. we only look at whether an integer is even or odd. In this case, it is true that $x+yz = (x+y)(x+z)$, since the quantity on the left is even (resp. odd) if and only if the quantity on the right is even (resp. odd).

A more mathematical answer for why $x \vee (y \wedge z) = (x \vee y) \wedge (x \vee z)$ has to do with duality. Every boolean algebra $\mathbb{B}$ has a dual $\mathbb{B}^{\mathrm{op}}$, defined so that the meet of $\mathbb{B}^{\mathrm{op}}$ is the join of $\mathbb{B}$, the join of $\mathbb{B}^{\mathrm{op}}$ is the meet of $\mathbb{B}$, and the top and bottom elements are swapped. This means that any equation that holds in an arbitrary Boolean algebra must also be true in an arbitrary Boolean algebra if we swap $\wedge$ and $\vee$ (and $\top$ and $\bot$).

• Even modulo $2$, it's not generally the case that $x+(yz)=(x+y)(x+z)$; consider $x=y=1$ and $z=0$. In Boolean terms, "xor" doesn't distribute over "and", even though (inclusive) "or" does. May 19, 2018 at 22:04

It looks weird to you because of the convention of two variables side-by-side meaning "multiply".

First, rewrite the boolean multiplicative (AND) distributive rule, the "x(y+z) = xy + xz" one that looks normal to you, as follows:

x * (y + z) = (x * y) + (x * z)

Now, you can see that the boolean additive (OR) distributive rule is exactly the same in form as the multiplicative one above, just with the "+" and "*" symbols swapped. It looks like this:

x + (y * z) = (x + y) * (x + z)

This should clear up why these two distributive properties are really the same property. Also, don't forget that the "+" here does not mean add. Boolean AND (*) is more similar to our familiar arithmetic multiplication than boolean OR (+) is to arithmetic addition. You can see this by the fact that all the statements made by the truth table for AND (*) are also valid in arithmetic, using "*" to mean multiply. This is not true for OR (+), as 1 + 1 does not equal 1 in ordinary arithmetic.

See what I mean about the boolean truth tables:

0 * 0 = 0 -----> true in boolean and arithmetic

0 * 1 = 0 -----> true in boolean and arithmetic

1 * 0 = 0 -----> true in boolean and arithmetic

1 * 1 = 1 -----> true in boolean and arithmetic

0 + 0 = 0 -----> true in boolean and arithmetic

0 + 1 = 1 -----> true in boolean and arithmetic

1 + 0 = 1 -----> true in boolean and arithmetic

1 + 1 = 1 -----> not true in ordinary arithmetic

It is this difference for OR (+) that makes the identity false in ordinary arithmetic, while the corresponding AND (*) identity is true.

I will start from this point in your original post:

$$xx+xz+xy+yz.$$

In boolean algebra, we have $$xx=x$$ ($$x$$ and $$x$$ is $$x$$), yielding

$$x+xz+xy+yz.$$

Then, factor out an $$x$$ to obtain

$$x(1+xz+xy)+yz.$$

In boolean algebra, "expression OR 1" evaluates to "1", yielding

$$x(1)+yz.$$

In boolean algebra, "expression AND 1" evaluates to "expression", which gives

$$x+yz.$$

Sorry for my bad English. I'm study Boolean Algebra. First, in ordinary algebra, it is not $$xx+xz+xy+zz$$ if you expand $$(x+y)(x+z)$$. It's $$xx+xy+xz+yz$$.

According to my understanding, the laws are the same for both ordinary and Boolean algebra. In Boolean algebra, according to distributive laws, $$(x+y)(x+z)$$ could expand like ordinary algebra:

$$(x+y)(x+z)=xx+xz+xy+yz$$

But for Boolean Algebra, it's not the simplest form. Because Boolean Algebra only has two possible value, therefore:

$$xx+xz+xy+yz=x+xz+xy+yz=x1+xz+xy+yz=x(1+y+z)+yz=x+yz$$

Please correct me if I'm wrong.