An ultrasonic transducer according to an embodiment includes a piezoelectric layer, a first electrode, a second electrode, a base layer, and a substrate. The first electrode is disposed in a front side of the piezoelectric layer and extends along a first direction. The second electrode is disposed in a back side of the piezoelectric layer and extends along a second direction intersecting with the first direction. The base layer is disposed in a back side of the second electrode. The substrate is disposed in a back side of the base layer. Each of the first electrode and the second electrode includes an overlap portion where the first electrode and the second electrode overlap each other when viewed from the front side of the piezoelectric layer. The substrate is provided with a cavity on a back side of the overlap portion on each of the first electrode and the second electrode. Each of the first electrode and the second electrode has the width of the overlap portion that is larger than the width of a peripheral portion of the overlap portion.