Incoming visual signals. Despite the importance of recurrent circuits for cortical processing, the basic rules that govern how nearby cortical neurons influence each other remain enigmatic. We used two-photon holographic optogenetics to activate ensembles of neurons in Layer 2/3 of the primary visual cortex (V1) in the absence of external stimuli to isolate the impact of local recurrence from external inputs. We find that the spatial arrangement and the stimulus feature preference of both the stimulated and the target ensemble jointly determine the net effect of recurrent activity, defining the cortical activity patterns that drive competition versus facilitation in L2/3 circuits. Computational modeling suggests that a combination of highly local recurrent excitatory connectivity and selective convergence onto inhibitory neurons gives rise to these principles of recurrent activity. Our data and modeling reveal that recurrent activity can have varied impact, but a logic emerges through an understanding of the precise spatial distribution and feature preference of the multicellular pattern of activity.