By rank I imply rank over reals ($\mathbb R$).


I consider two $n\times n$ matrices $A,B$ having entries in $0/1$.


The product below follows usual matrix product rules except $xy$ is $AND(x,y)$ and $x+y$ is $OR(x,y)$.


Assume real rank of $AB$ is $n$ and assume $det(AB)=per(AB)=1$.



> 
> 1. Would it follow $per(A)=per(B)=1$?
> 
> 
> 


$1$. implies $rank(A)=rank(B)=n$.


Assume real rank of $AB$ is $<n$ and assume $det(AB)=per(AB)=0$.



> 
> 2. Would it follow $per(A)per(B)=0$ and would it imply $rank(A)+rank(B)<2n$.
> 
> 
> 



> 
> 3. How about the status of 1. and 2. if product remains Boolean product but rank is determined in $\mathbb F\_2$?
> 
> 
> 



$\mathbb R$ and $\mathbb F_2$ rank in boolean matrix product
For $n = 3$, 1) is false: let $A = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{pmatrix}$ and $B = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{pmatrix}$.


Some obvious modifications to the code below also show that the first question in 2) is false: let $A$ be as before and $B = \begin{pmatrix} 1 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 1 & 0 \end{pmatrix}$.


Similarly, the second question in 2) is false: let $A'' = \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{pmatrix}$ and $B'' = \begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{pmatrix}$.


Question 3) takes longer to test since the GF(2) arithmetic is slower(!) in MATLAB. The analogue of 1) holds for $n = 3$. The analogue of the second question in 2) also holds for $n = 3$, but the analogue of the first question in 2) does not: here a counterexample is furnished by $\begin{pmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0 \end{pmatrix}$ and $\begin{pmatrix} 0 & 0 & 1 \\ 1 & 1 & 0 \\ 1 & 1 & 0 \end{pmatrix}$.


The MATLAB code I used for 1) is below. It requires the communications toolbox and a third-party function for the permanent as indicated in a code comment.



```
n = 3;
if n < 2, error('n < 2'); end
if n > 4, error('n > 4'); end
for j = 0:((2^(n^2))-1)
    bits_j = bitget(j,1:n^2,'uint32');
    A_R = reshape(bits_j,[n,n]);    % real
    rankA = rank(A_R);
    A = gf(A_R);    % GF(2) vs real
    for k = 0:((2^(n^2))-1)
        bits_k = bitget(k,1:n^2,'uint32');
        B_R = reshape(bits_k,[n,n]);    % real
        rankB = rank(B_R);
        B = gf(B_R);    % GF(2) vs real
        AB = double(getfield(A*B,'x')); % real vs GF(2)
        r = rank(AB);
        if r == n
            if det(AB) == 1
                % Permanent using
                % https://www.mathworks.com/matlabcentral/fileexchange/22194-matrix-permanent
                per = permanent(AB);
                if per == 1
                    perA = permanent(A_R);
                    perB = permanent(B_R);
                    if any([perA,perB]~=[1,1])
                        disp(A_R);
                        disp(B_R);
                        error('violation');
                    end
                end
            end
        end
    end
end

```

