Unmanned aerial vehicle (UAV) relaying is one of the main technologies for UAV communications. It uses UAVs as relays in the sky to provide reliable wireless connection between remote users. In this paper, we consider a multi-hop UAV relaying system. To improve the spectrum efficiency of the system, we maximize the average end-to-end throughput from the source to the destination by jointly optimizing the bandwidth allocated to each hop, the transmit power for the source and relays, and the trajectories of the UAVs, subject to constraints on the total spectrum bandwidth, the average and peak transmit power, the UAV mobility and collision avoidance, and the information-causality of multi-hop relaying. The formulated optimization is non-convex. We propose an efficient algorithm to approximate and solve it, using the alternating optimization and successive convex optimization methods. Numerical results show that the proposed optimization significantly outperforms other benchmark schemes, verifying the effectiveness of our scheme. INDEX TERMS Bandwidth allocation, multi-hop relaying, power allocation, trajectory optimization, UAV communication. I. INTRODUCTION Due to the advantages of high flexibility, low cost, and ease of use, unmanned aerial vehicles (UAVs) have been widely used in cargo delivery, traffic monitoring, precision agriculture, and so on. Recently, research has shown that integrating UAVs into communication systems is an effective way to improve wireless performance and it has the following advantages [1], [2]. First, on-demand UAV wireless communication system can be swiftly deployed with low cost for temporary and emergent coverage. Second, lineof-sight (LoS) links can be established between UAVs and ground nodes or between different UAVs with high probability, which can improve the link quality of the system. Third, the communication performance of a UAV wireless communication system can be improved by adaptive resource allocation along with UAV trajectory design. On the other The associate editor coordinating the review of this manuscript and approving it for publication was Shravana Musunuri.