This lecture covers the formulation of Hamiltonians for machine elements in 3D, focusing on multipoles of different orders. It explains the Hamiltonians for drift space, dipole, quadrupole, and sextupole magnets, emphasizing the paraxial approximation for linear maps. The lecture also discusses the matrix representation of linear maps, particle motion in phase space, and the concept of thin lens approximation for focusing. Furthermore, it explores the construction of FODO lattice configurations, stability conditions, and the transfer matrix approach for beamline calculations.