An ultrasonic device includes a substrate, first ultrasonic elements having a resonance characteristic of a first frequency, and second ultrasonic elements having a resonance characteristic of a second frequency lower than the first frequency. The first ultrasonic elements are arranged along a first direction to make a first to an n-th high-frequency ultrasonic element lines. The second ultrasonic elements are arranged along the first direction to make a first to an n-th low-frequency ultrasonic element lines. The first to the n-th high-frequency ultrasonic element lines and the first to the n-th low-frequency ultrasonic element lines are arranged along a second direction. The first and second ultrasonic elements have an opening, a vibrating membrane, and a piezo element part. A length in the second direction of the opening of the first ultrasonic element is shorter than a length in the second direction of the opening of the second ultrasonic element.