To express GAL4 in only the cells contained in both A and B, a technique called "split-GAL4" can be used. Line A is made to express half of the GAL4 protein, which is inactive by itself. Similarly, line B is made to express the other half of GAL4, also inactive by itself. Only the cells that are in both lines make both halves, which self-assemble by leucine zipper into GAL4 and activate the reporter gene.
