Some extremal problems for positive definite matrices and operators