Recent applications like mmWave technologies require antenna characteristics such as high gain and wide bandwidth for smooth operation with high speed. Hence, this paper presents a novel pi‐shaped patch antenna framed within a square structure for mmWave applications at 28 GHz. In the process of designing a four‐element linear‐planar antenna array (LPAA), a thin single antenna element is designed on a 0.275 mm Rogers 5880 substrate with a dielectric constant of 2.2. The proposed single‐element antenna provides a gain of 3 dBi at 28 GHz and a wide impedance bandwidth ranging from 22.482 GHz to 40.511 GHz. Then, this proposed structure is transformed into a four‐element LPAA with a compact dimension of 0.263 mm × 18.55 mm × 23.99 mm. To enhance and predict the impedance bandwidth of the proposed LPAA, mathematical modeling using response surface methodology and constrained numerical optimization is applied. In the optimization process of the antenna, independent factors such as substrate height (Hs) and interelement spacing (d) that influence the antenna’s responses such as impedance bandwidth (BW) and operating frequency (Fr) are considered. These factors are varied repeatedly and simulated using computer simulation technology (CST) suite 2019 for preparing the dataset, which is used as an input for mathematical modeling. Then, response surface methodology (RSM) is employed to relate the responses with independent factors. Models are validated using analysis of variance (ANOVA). The optimum parameters determined by applying constrained numerical optimization are substrate height (Hs) and interelement spacing (d) of values 0.263 mm and 5.61 mm, respectively. The optimized LPAA provides a wide bandwidth of 11 GHz and a peak gain of 9.25 dBi. The antenna also gives radiation efficiency of ≥98.5% and VSWR of less than 2 in its operating frequency range. The results included here are simulated using the CST EM solver and validated using the Ansys High‐Frequency Simulation Software (HFSS). The proposed antenna provides high gain and wide bandwidth, which makes it a good candidate for 5G wireless communication applications.