Trustworthy information regarding early schools is not abundant; naturally, educational statistics, such as we are accustomed to, do not exist, but evidence is not awanting that long before the 14th century some provision was made for the education of youth according to the ideas of the age. Schools of various kinds were to be found over the greater part of Scotland and, in the more important towns, some provision was made for advanced education. Schools were, at first, under the control of the Church and the all important subject of instruction was "grammar" - a term, which in those days had a much wider connotation than now and was practically equivalent to Latin literature. In fact down to the 18th century Latin dominated the schools to a degree that is hard for us to realise. The grammar school, whether attached to Cathedrals, Abbeys or Collegiate Churches, was controlled by the ecclesiastical authorities, while the expense of maintenance was met out of municipal funds. In these schools, so far as I can learn, little if any geometry was taught and arithmetic was not highly esteemed as a "culture" subject. I can find no definite statement of the nature or range of arithmetical teaching, but it seems probable that writing and the elements of arithmetic were taught in schools of a lower rank than the grammar schools and that children frequently attended such schools before being enrolled in a grammar school. (Cf. Grant, Burgh Schools, pp. 29-34, p. 398). In the schools more directly associated with the training of the clergy the computus would almost certainly have a place while, if we may judge by the contemporary practice on the Continent, the grammar school arithmetic would be based on that of Nicomachus. The algorisms, the arithmetics of practical life, were apparently considered by the ruling authorities unworthy of a place in higher school education. However that may be, writers on Scottish education are agreed that arithmetic did not in any proper sense form an element of school education till the latter half of the 17th century and that the same may be said regarding algebra and geometry. The low value thus placed on mathematics is not, however, peculiar to Scotland; John Wallis's Account of some Passages in his Own Life (quoted in Adamson's Short History of Education, p. 185) shows conclusively that matters were no better in England.
Gibson History 2 - Mathematics in the schools
In the 17th century a great change begins to take place. Definite mention of arithmetic as part of the school curriculum is found at Aberdeen in 1628, at Irvine in 1665, at Dunbar in 1690 and at Stirling before 1697. The earliest notice of mathematics is at Glasgow in 1660 but there seems to be no further reference to it till the next century. About the middle of the 18th century the demand for an education of a more liberal and practical kind - a demand which had been steadily growing for several years and which had been partly met by broadening the curriculum of the grammar schools - gave rise to a new type of school to which the name of "Academy" was given. The oldest of these academies is Perth Academy, founded in 1760, and it began with a very ambitious programme in mathematics, viz., the higher branches of arithmetic; mathematical, physical and political geography; algebra, including the theory of equations, and the differential calculus; geometry, consisting of the first six books of Euclid; plane and spherical trigonometry; mensuration of surfaces and solids; navigation, fortification; analytical geometry and conic sections, natural philosophy, consisting of statics, dynamics, hydrostatics, pneumatics, optics and astronomy. At a later date chemistry was added.
It is, I should think, improbable that this programme was ever carried out with any degree of thoroughness but it marked a decided change for the better and the example of Perth was followed elsewhere so that good school courses of mathematics were established in many towns. These were not due to the demands of the Universities as no University imposed any serious preliminary knowledge of mathematics on its students though it was from the Universities that the teachers were drawn. In many of the parish schools the schoolmasters were competent to impart advanced instruction in Latin, Greek and Mathematics and were proud of such pupils as took advantage of the opportunities offered. I think, however, that while Scotland has good reason to be grateful to the old time parish schoolmaster, it is too often forgotten that many parishes were very badly off in respect of both teachers and buildings. The old Statistical Account has many sad details of incompetent schoolmasters and inadequate schools.