The process in which a solute is transported from one side of a membrane to the other into, out of or within a mitochondrion.