# Multiplication of two matrices ? one in GF(2) other in R

## Homework Statement

H is a nxn matrix with elements in {0,1}
G is a nxn matrix with elements in GF(2)
m is a nx1 vector with elements in GF(2).
How can we perceive the output of
HGm where Gm multiplication is in GF(2) and H multiplication is a normal real multiplication.
Actually I want to combine HG transformation into one P transformation. How can I multiply two matrices while elements in one is in GF(2) and other is in R ?
(We can also restrict the entries in H to be one of 0 and 1 but the output can be in R).

## The Attempt at a Solution

Related Calculus and Beyond Homework Help News on Phys.org
Deveno
the entries in the vector Gm will still be in GF(2) = {0,1}.

so basically the vector Gm acts as a "choice function" picking out which columns of H get summed in the ouput, which will be a real-valued vector.

it makes more sense to do it this way, than to imagine what "HG" means (in this case G acts in a more complicated way, which is then subjected to another selection via m).

in general, (HG)m and H(Gm) won't yield the same results:

[a b]([1 0])
[c d]([1 1]) =

[a b]
[c d], which is (a,c)

([a b][1 0])
([c d][1 1]) =

[a+b b]
[c+d d] = (a+2b,c+2d), which is only equal to the first mod 2.