Will getting a B in math [linear algebra at a college] as a prospective math major hurt my chances at top schools?

Linear algebra can be regarded as a gateway course into college mathematics. While the grade itself may not have a major impact on your college applications, you might want to repeat this course at your destination college for a firmer foundation in this topic.

Regarding your greater college search, this site may be of interest based on your interest in math:

Athough the suggested schools vary somewhat in selectivity, they are all “top colleges.”