Optimal Online Learning With Matrix Parameters