## 3 Results and Discussion
The C\({}_{1}\) and C\({}_{2}\) in panel (**b,d**) represent the EDS of regions shown in Figure 5b and 5d, respectively. (3) when the fracture occurs through the eutectic region (sample B), the UTS is higher than when the fracture occurs within the IMCs layer (sample D). In order to realize the correlation between microstructure and fracture behavior, the fracture surfaces were investigated by SEM (Figure 8). A comparison of results reveals that fracture location initiation significantly impacts fracture morphology. Intermetallic compounds greatly influence fracture morphology in Al/Mg alloys. Because of their low fracture toughness, the IMCs are prone to cracking and breaking under load [17]. As EDS results proved, Al\({}_{12}\)Mg\({}_{17}\) and Al\({}_{3}\)Mg\({}_{2}\) are two intermetallic compounds detected at the interface of Al and Mg. Figure 8(a1,a2) show the fracture surfaces of sample A from the AA1050 and AZ91 sides, respectively. The fracture surfaces indicate the presence of both ductile and brittle characteristics, resulting in a lamellar structure. The brittle fracture was observed in the Al\({}_{12}\)Mg\({}_{17}\) intermetallic compound in the nugget zone. The failure of sample A occurred from the nugget zone, which includes the Mg phase and eutectic structure comprising the Mg and Al\({}_{12}\)Mg\({}_{17}\) intermetallic compound, as shown in Figure 7c. The fracture surfaces of sample B are presented in Figure 8(b1,b2). The fracture surface of the AA1050 side shows the presence of both ductile and brittle characteristics, whereas the AZ91 side shows a completely brittle fracture. The brittle fracture occurred between the Al\({}_{12}\)Mg\({}_{17}\) and Al\({}_{3}\)Mg\({}_{2}\) intermetallic compounds on the Al side, whereas ductile fracture occurred in the AA1050 matrix. The brittle fracture occurred in the Al\({}_{12}\)Mg\({}_{17}\) intermetallic compound on the Mg side. The brittle phase in both Al and Mg sides had the composition of Al\({}_{12}\)Mg\({}_{17}\) and  
Figure 7: (**a**) Examined shear stress-displacement diagram of the shear-tensile tests of welded samples, (**b**) bar chart demonstrating obtained maximum UTS for samples, and (**c**) a schematic illustration of fracture location in sample A–D. Al\({}_{3}\)Mg\({}_{2}\). The failure of sample B occurred from the mixing zone, which includes the Mg phase and eutectic structure comprising the Mg and Al\({}_{12}\)Mg\({}_{17}\) intermetallic compound, as shown in Figure 7c. The fracture surfaces of sample C are presented in Figure 8(c\({}_{1}\),c\({}_{2}\)). The fracture surface of the Al side indicates a brittle fracture, whereas the Mg side shows a ductile fracture. The presence of intermetallic compounds Al\({}_{3}\)Mg\({}_{2}\) caused a brittle failure in the welding zone. The failure of sample C occurred from within the mixing zone, which includes the Mg phase and intermetallic compound Al\({}_{3}\)Mg\({}_{2}\). According to Figure 5c, the intermetallic compound formed in sample C is in the form of a continuous layer with very low thickness, resulting in the highest strength among the samples. The arrangement of the different phases at the junction is shown in Figure 7c. The fracture surface of sample C is soft, and the strength is very high due to the thinness of the intermetallic compounds, which caused the fracture strength of the weld to exceed the yield strength of the aluminum. Before the weld failure, the base Al experienced some plastic deformation, with a force required to yield Al in this state equal to N 2025 (15 \(\times\) 3 \(\times\) 45), resulting in high deformation. The fracture surfaces of sample D are depicted in Figure 8(d\({}_{1}\),d\({}_{2}\)). The fracture surface of the AA1050 side indicated the presence of both ductile and brittle characteristics, with the Al\({}_{12}\)Mg\({}_{17}\) composition observed on the fracture surface. The recoil of Al\({}_{12}\)Mg\({}_{17}\) was higher on the Al side than on the Mg side, resulting in ductile failure in some areas but often in brittle fractures at the joint.