# How do you do a cross product of two $3 \times 3$ boolean matrices?

I have two boolean matrices:

A = |1 1 0|
|0 1 0|
|0 0 1|

and

B = |1 0 0|
|1 1 1|
|0 0 1|

What is the result of A x B and what are the steps needed to attain the result?

Note: My textbook says that the answer to the above is:

A x B = |1 1 1|
|1 1 1|
|0 0 1|

and that A * B is not equal to A x B. Unfortunately, it does not give the steps needed to find the solution.

-
It looks like you're being asked for a matrix product, not a cross product. – Qiaochu Yuan Mar 8 '11 at 22:06
My source specifically states that A*b is not equal to AxB. Unfortunately, it does not provide one single example. – trusktr Mar 8 '11 at 22:10
See edited question above – trusktr Mar 8 '11 at 22:18
Does it provide a definition or not? That is very strange. – Qiaochu Yuan Mar 8 '11 at 22:28
It doesn't. The book is a programming book assuming we know this math already. – trusktr Mar 8 '11 at 22:47

## 1 Answer

I think it is the same as conventional matrix multiplication just that the multiplication is replaced by the "and" operation while the addition is replaced by the "or" operation.

Hence, $$A \times B = \begin{bmatrix} 1 & 1 & 0 \\\ 0 & 1 & 0 \\\ 0 & 0 & 1 \end{bmatrix} \times \begin{bmatrix} 1 & 0 & 0 \\\ 1 & 1 & 1 \\\ 0 & 0 & 1 \end{bmatrix}$$

$$A \times B = \begin{bmatrix} (1 \& 1) || (1 \& 1) || (0 \& 0) & (1 \& 0) || (1 \& 1) || (0 \& 0) & (1 \& 0) || (1 \& 1) || (0 \& 1) \\\ (0 \& 1) || (1 \& 1) || (0 \& 0) & (0 \& 0) || (1 \& 1) || (0 \& 0) & (0 \& 0) || (1 \& 1) || (0 \& 1) \\\ (0 \& 1) || (0 \& 1) || (1 \& 0) & (0 \& 0) || (0 \& 1) || (1 \& 0) & (0 \& 0) || (0 \& 1) || (1 \& 1) \end{bmatrix}$$

$$A \times B = \begin{bmatrix} 1 & 1 & 1 \\\ 1 & 1 & 1 \\\ 0 & 0 & 1 \end{bmatrix}$$

-