In hermaphroditic plants, the effect of a social environment on sex allocation has not been studied to our knowledge, while in hermaphroditic animals such effects are known to be common. In recent years, studies on root competition beyond the effects of nutrients have shown that plants can respond to their conspecific root competitors (social environment), making it interesting to ask if these effects could also influence sex allocation in addition to more commonly studied factors, such as plant size or resources. In this study on hermaphroditic Viola tricolor, we investigated how plant size, soil nutrients and presence of a root competitor influenced allocation to pollen competitive ability versus seed production, i.e. male and female reproductive functions. We allowed plants to grow in pairs with partly intermingled or separate roots in the same amount of soil. In additional treatments with intermingled roots (as part of the same experiment) one of the two competitors was given combinations of nitrogen (N), phosphorous (P) and micro nutrients. We found that pollen performance but not seed production increased when plants were in contact in the soil. Additionally, pollen performance was negatively correlated to plant size across fertilisation treatments. For seed production, the opposite relation to plant size was seen, indicating that large, fertilized plants invest relatively more in the female function. In conclusion, in violets, sex allocation appears to be size-dependent and influenced by both the presence of a root competitor and by nutrients. These results suggest that social environment can influence sex allocation in plants as well as in animals, indicating that such effects are important to consider in sex allocation studies across taxa.