A design technique to develop the desired pattern with uniform spacing between elements for a resonant linear slot array on the broad wall of a rectangular waveguide is discussed in this study. First, linear array pattern synthesis is used to achieve the amplitude and phase of the array element. Then both radiation pattern synthesis and the array input impedance matching are achieved using the least-squares method. In addition, the error function is created by combining the three terms of impedance matching, array pattern synthesis, and slot design equations. Genetic algorithm (GA) and the conjugate gradient (CG) technique are used to minimize the acquired error function. The utilized approach results in precise pattern synthesis, good impedance matching, development of appropriate design equations, and power loss minimization. The computing needs were also reduced using the suggested antenna design. The approach is particularly beneficial since it integrates slot parameter dimensions and impedance matching with array pattern synthesis, resulting in a faster and more accurate design. Full-wave simulation Software HFSS was utilized to validate the suggested design method. Moreover, the measurements were conducted on a prototype designed to validate the simulation's accuracy and the designed antenna practicality, and excellent agreements between theoretical predictions and simulation results were achieved.