Hello,
An LOR is generally not specific to the area of study of either the student or teacher and instead is based on the teacher's personal interaction with the student inside and outside the classroom. It also gives insight to the reader about the character of the student as perceived by the recommender.
A sample LOR for Math can be found here:
https://www.eduers.com/graduate/sample_letters_of_recommendation_math_cs/
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile