The variational thinking of high school students based on mathematical connections was analyzed through a laboratory on linear functions. This qualitative research based on design was developed in three phases: diagnostic test, implementation of the mathematics laboratory and final test, with students from a public institution in Barranquilla, Colombia. The diagnostic test revealed difficulties in the concept of linear function and the modelling of situations. Therefore, a laboratory was implemented with eight activities focused on the concept of linear function, variation situations, generalization and conversion between different representations of the linear function (verbal, numerical, tabular, graphical, and algebraic). The results showed a significant advance in the variational thinking of the students, who managed to establish connections between different representations, procedural, metaphorical and better understand the meanings of the linear function. Also, the type of mathematical tasks used promote mathematical connections and variational thinking about the linear function and applications.