Homepage › Solution manuals › Gilbert Strang › Linear Algebra and Learning from Data › Exercise 3.1.10
It’s easy to check that the formula is correct.