How are low/middle/high classes defined mathematicaly? I am only looking for mathematical references. I think this belongs to econometrics but am not sure nor where to look at it specifically. I suspect the definition is given with some kind of weighted average where income and number of people with similar income are computed.
Actually there is no single agreed upon definition of low middle and high class. For example, Pew research center uses the following definitions:


  “Pew Research defines middle-income Americans as those whose annual household income is two-thirds to double the national median. For a family of three, that ranges from \$42,000 to \$126,000 in 2014 dollars.
  The lowest-income group earned \$31,000 or less for a family of three while the lower-middle group earned between \$31,000 and \$42,000 in 2014, according to Pew Research. At the most affluent levels, upper-middle-income, three-person households earned between \$126,000 and \$188,000, with the highest-income households topping \$188,000 in 2014 earnings.”


In economics research on income distributions usually people don’t explicitly define what low middle or high class is but rather they calculate deciles of income distribution and then also 99percentile and 99.9 percentile (that is the very rich and ultra rich). 

But really you could define it in multiple ways splitting it by quartiles where the lowest quartile is lower class two quartiles in middle are middle class and upper quartile is upper class would also make sense. Saying lower class is just lowest 10% and upper class highest 1% and everything in between is middle and upper middle class could also make sense etc. So the ‘best’ way how to measure it is to certain degree arbitrary and different measures could be appropriate in different settings.