Geopolymer composite materials are a viable alternative to conventional construction materials. The research problem of geopolymer composites revolves around the imperative to comprehensively address their synthesis, structural performance, and environmental impact. The derived mathematical model facilitates precisely determining the optimal proportions of two crucial constituents in the geopolymer matrix: silica sand and secondary aluminium by-product. A mathematical model for optimising the composition of geopolymer composites has been developed based on the integrated use of Markov chains, criterion methods and orthogonally compositional plan. The optimal composition of the geopolymer matrix is determined and predicted using a mathematical model. Specifically, the recommended content mixing ratio is as follows: metakaolin at 1000 g, activator at 900 g, silica fume at 1052.826 g, carbon fibre at 10 g, and secondary aluminium by-product at 62,493 g. Analysing the influence of different secondary aluminium industry by-products on the geopolymerization process, and assessing the mechanical, thermal, and environmental properties of the resulting composites to establish a comprehensive understanding of their structural viability.