A piezoelectric device comprising: a substrate that includes at least one space; a vibration plate that is stacked on one surface of the substrate and seals the space; and a piezoelectric element that includes a first electrode, a piezoelectric layer, and a second electrode sequentially stacked on a surface of the vibration plate opposite to the substrate, wherein a width of the first electrode along a first direction that is parallel to the surface of the vibration plate is narrower than a width of the space along the first direction, wherein the piezoelectric layer is stacked so as to overlap the first electrode and at least a part of the vibration plate in the region corresponding to the space, wherein the second electrode is stacked so as to overlap the piezoelectric layer in the region corresponding to the space, wherein the piezoelectric layer includes a first piezoelectric layer and a second piezoelectric layer, wherein the first piezoelectric layer is positioned on the first electrode and the second piezoelectric layer is positioned on the first piezoelectric layer and on a part of the vibration plate in the region corresponding to the space, wherein the second piezoelectric layer includes a first side surface which is inclined upwardly toward the center of the space in the first direction, and a first upper surface connected to the first side surface, wherein the second piezoelectric layer includes a convex portion, which is wider than the first electrode in the first direction and the convex portion is convex in a direction opposite to the vibration plate, is provided on the first upper surface, wherein the second piezoelectric layer includes a second side surface connected to the first upper surface and inclined upwardly toward the center of the space in the first direction, and a second upper surface connected to the second side surface, wherein a part of the second piezoelectric layer is provided between the second upper surface and the first piezoelectric layer, wherein a first thickness between the second upper surface and an upper surface of the first electrode is larger than a second thickness between the first upper surface and an upper surface of the vibration plate, and wherein a fifth thickness between the upper surface of the vibration plate and an upper surface of the first piezoelectric layer is larger than a fourth thickness between the first upper surface and the second upper surface. a substrate that includes at least one space; a vibration plate that is stacked on one surface of the substrate and seals the space; and a piezoelectric element that includes a first electrode, a piezoelectric layer, and a second electrode sequentially stacked on a surface of the vibration plate opposite to the substrate, wherein a width of the first electrode along a first direction that is parallel to the surface of the vibration plate is narrower than a width of the space along the first direction, wherein the piezoelectric layer is stacked so as to overlap the first electrode and at least a part of the vibration plate in the region corresponding to the space, wherein the second electrode is stacked so as to overlap the piezoelectric layer in the region corresponding to the space, wherein the piezoelectric layer includes a first piezoelectric layer and a second piezoelectric layer, wherein the first piezoelectric layer is positioned on the first electrode and the second piezoelectric layer is positioned on the first piezoelectric layer and on a part of the vibration plate in the region corresponding to the space, wherein the second piezoelectric layer includes a first side surface which is inclined upwardly toward the center of the space in the first direction, and a first upper surface connected to the first side surface, wherein the second piezoelectric layer includes a convex portion, which is wider than the first electrode in the first direction and the convex portion is convex in a direction opposite to the vibration plate, is provided on the first upper surface, wherein the second piezoelectric layer includes a second side surface connected to the first upper surface and inclined upwardly toward the center of the space in the first direction, and a second upper surface connected to the second side surface, wherein a part of the second piezoelectric layer is provided between the second upper surface and the first piezoelectric layer, wherein a first thickness between the second upper surface and an upper surface of the first electrode is larger than a second thickness between the first upper surface and an upper surface of the vibration plate, and wherein a fifth thickness between the upper surface of the vibration plate and an upper surface of the first piezoelectric layer is larger than a fourth thickness between the first upper surface and the second upper surface.