Factors in the Formation of Attitudes Toward Mathematics