The acoustic ray model with a strong connection to the billiard problem is presented within the framework of the Hamiltonian form. Introducing the background function into the sound-speed profile to confine all rays in a closed space, we obtain the ray trajectories consistent with a billiard picture. The ray chaos is observed when the perturbation due to inhomogeneity of the medium is taken into account. Based on the Poincaré surface of section and the Lyapunov exponents, we confirm that the chaos is characterized by almost the same structure as one observed in many Hamiltonian systems with two degrees of freedom.The acoustic ray has a strong analogy with a particle trajectory in the billiard problem. The billiard problem is to investigate the dynamics of a particle moving freely with a constant speed in two dimensions surrounded by the hard wall and being perfectly reflected at impacts with the boundary. 1 The reflection on the boundary obeys the law that the angle of reflection equals the angle of incidence. Similarly, the acoustic ray under the high-frequency limit moves straight in the interior of a closed space and obeys the reflection law on the boundary with a constant speed in a homogeneous medium. 2 The behavior of the trajectories in the billiard system sensitively depends on the shape of the boundary. 1 The trajectories behave regularly for a shape such as a circle, a rectangle and an oval, while they exhibit chaotic behavior for the shape of a stadium. This behavior of the trajectories in the billiard problem reflects the dynamics of the acoustic ray in a closed space as follows: In the domain with a rectangular or other simple shape, the acoustic ray propagates regularly in a manner that it moves straight in the interior and changes its direction at the wall according to the reflection law, while the ray behaves chaotic in the interior of the irregular shapes like the stadium type. Thus this analogy between the billiard and the ray system in a homogeneous medium seems to impose a strong restriction on the relation between the shape of closed space and the emergence of the acoustic ray chaos.On the other hand, for a more realistic case that a medium has inhomogeneity, the ray motion is perturbed and its trajectory deviates from a straight line. For example, the ray trajectory is curved when there is a temperature fluctuation in the medium. In the conventional framework of the billiard problem studied so far, such an effect of the inhomogeneity has not been taken into account on the ray motion. From the point of view of the acoustic ray chaos, it is a very important issue to study the billiard problem for the perturbed ray propagating in the domain with regular shapes.In this Letter we try to formulate the acoustic ray model that involves the billiard problem connected with the inhomogeneous medium. The ray equations are formulated by the Hamiltonian form. The billiard problem is realized by modeling the sound-speed profile so as to trap all rays in the bounded space. When the sound speed is perturbed ...