Muslims form about 18 per cent of Uttar Pradesh's population. In urban areas, they form 32 per cent of voters; in rural parts, they are about half that. They are concentrated mainly in the North, and historically, they tend to back the Congress or the SP - the pairing won 66 per cent of the Muslim vote in 2014 while Mayawati's BSP got about 21 per cent (the rest was divided among others).
In 2014, when Uttar Pradesh overwhelmingly supported Prime Minister Narendra Modi - the BJP won the equivalent of 337 of the state's 403 seats, the Muslims voted against the "Modi wave" - in 2012, the SP and Congress together won 56% of the Muslim vote, but that grew to 66% in 2014. The BSP held steady at about 21%. So when the Muslims consolidated, they did so largely around the SP and the Congress, while Mayawati did not see a gain.
In areas with a high percentage of Muslim voters, the Hindu vote coalesces around the BJP. The party gets about 43 per cent of Hindu voters in constituencies where Muslims add upto less than 30 per cent of the population and goes up to 46 per cent in areas where Muslims are larger in number.