## 1 Introduction
The miniaturization and portability of modern electronic devices has put forward higher requirements about the magnetism of electronic materials. As emerging materials at present, 2D materials have become the focus of experimental and theoretical research [30; 31; 32]. However, most 2D materials themselves are non-magnetic. How to induce and regulate magnetism in 2D non-magnetic materials is increasingly becoming the focus of research [33]. On the other hand, prepared materials always have defects such as atomic disorder, swap, vacancy and impurity. They all cause important influences on the electronic structure, and then magnetic and optical properties of 2D materials [34; 35]. The doping of elements B and V on different positions of the Ti\({}_{2}\)C MXene nanosheet had resulted in great changes in the electronic structure, and then magnetic properties of this nanosheet so that some novel semiconductor properties were added [36]. Similar magnetic behavior had been also observed in different MXene decorated by some functional groups. For examples, Cr\({}_{2}\)C is a half-metallic ferromagnetic. However, with F, Cl, OH or H functionalization, Cr\({}_{2}\)C is transformed as the antiferromagnetic semiconductor [37]. The antiferromagnetic metal Cr\({}_{2}\)N becomes a stable ferromagnetic semi-metal under the action of O functional groups [38]. Cr\({}_{2}\)TiC\({}_{2}\)O\({}_{2}\) is nonmagnetic, whereas Cr\({}_{2}\)TiC\({}_{2}\)F\({}_{2}\) and Cr\({}_{2}\)TiC\({}_{2}\)(OH)\({}_{2}\) are antiferromagnetic, but Cr\({}_{2}\)VC\({}_{2}\)(OH)\({}_{2}\), Cr\({}_{2}\)VC\({}_{2}\)F\({}_{2}\) and Cr\({}_{2}\)VC\({}_{2}\)O\({}_{2}\) are ferromagnetic [39]. Few research had been carried on the surface doping and defects. The influence of point defects on the electronic structure, formation energy and magnetism of Ti\({}_{2}\)XT\({}_{2}\) (X = C/N, T = OH, F, O) had been studied. Results showed that small quantities of point defects might cause much variation of magnetic and electronic properties in the above material [40]. Therefore, although the defect has not become the research focus of new materials, it is still urgent to carry on the defect research for ensuring the practical application of 2D MXene materials in spintronic devices. M\({}_{4}\)X\({}_{3}\) (M meaning the transition metal element and X meaning C/N) MXene nanosheet is an ordinary 2D material in the MXene family. It has a large atomic layer thickness (seven layers, with a thickness greater than 7 A), and a complex structure comprising overlapping and staggered layers. Furthermore, the Ti\({}_{4}\)N\({}_{3}\) nanosheet is the first prepared N-based MXene and it has an intrinsic magnetic moment, which is weak, and then may be eliminated by surface functional groups [15]. In this paper, to understand influences of the atomic defect, swap disordering and vacancy on the structural, magnetic and electronic properties of 2D MXene material, the Ti\({}_{4}\)N\({}_{3}\) MXene nanosheet was investigated. The structure, electronic properties, and magnetism of Ti\({}_{4}\)N\({}_{3}\) nanosheet without functional groups were analyzed firstly. Subsequently the Ti or N vacancy defect was investigated for the surface or subsurface layer of the Ti\({}_{4}\)N\({}_{3}\) nanosheet. Secondly, a swap defect (named as Frenkel-type defect) between the N atom on the subsurface layer and Ti atom on the surface layer was studied. The structure change, electronic properties and magnetism of atoms around the defect atom were calculated and analyzed. In the end, the surface Ti atom of Ti\({}_{4}\)N\({}_{3}\) nanosheet was replaced by Sc, V and Zr atoms, respectively. The effects of doping on the structure, electronic properties and magnetism of the atoms, and then the Ti\({}_{4}\)N\({}_{3}\) nanosheet were discussed. We hope our results are useful to elucidating the various electronic and magnetic behaviors of 2D materials and the application research of new 2D Ti-based MXene nanosheet in spintronics.