BackgroundThe shift to virtual education from 2019 to 2021 in response to COVID-19 necessitated both teachers and students to adapt to new technological skills, thereby impacting the teaching and learning dynamics. With limited existing research on this evolving domain, our study aimed to gauge attitudes toward mathematics, and perceptions of virtual education during the COVID-19 era and explore potential correlations between these variables.MethodsIn this cross-sectional quantitative correlational primary study, secondary school students at a public school were asked to rate their attitudes toward mathematics and their perceptions of virtual teaching in the context of COVID-19 using two validated questionnaires. We used linear regression analysis to respond to our objectives.ResultsThe findings show that perceptions of virtual teaching (34.65%) and attitudes toward mathematics (40.16%) are both low. The dimensions of attitudes toward mathematics and perceptions of virtual education have a positive association and influence on one another (B = 0.464, p < 0.001).ConclusionBoth study variables show a low level and found a significant relationship between the dimensions of virtual learning perception and attitudes toward mathematics. More research is required to grasp how cognitive processing influences attitudes toward mathematics. This understanding can improve the proficiency of math educators, benefiting students at all educational stages.