Γ-Commuting triples of positive definite matrices and midpoint equations on unitary matrices