The Schwarz inequality via operator-valued inner product and the geometric operator mean