[2] The initiative was motivated by an interest that existed in the Spain of the late sixteenth century in promoting the teaching of mathematics with an eye to its practical applications in areas as diverse as mercantile calculation, cosmography, astrology on one hand, and the art of navigation and specific problems relating to military skills and construction techniques on the other.
It was founded in Lisbon in accordance with documents issued on December 25, 1582, and began functioning in October of the following year in offices of the Royal Alcazar of Madrid, and shortly afterwards in its own building nearby "at the entrance to Baldanú, in la calle del Tesoro".
Due to extensive changes in the royal offices, in 1612 the institution moved to the home of the Marquis of Leganes, with its facade on the "wide calle of San Bernardo" where it carried out its activities until about 1630, when all the property, income and instruments of the Academy were transferred to the Imperial College.
Soon afterwards the Marquis of Ensenada ordered Jorge Juan to divide it into independent branches, and in 1752 the Ordinance Plan for the Royal Society of Sciences of Madrid was drawn up.
It carried out its first activities in various locations (in the National Museum of Painting in the Tower of Lujanes) until 1897 when it arrived at its current headquarters in the calle Valverde at numbers 22 and 24 (premises that were formerly occupied by the Royal Spanish Academy).