# Matrix form - completing the square

1. Jul 29, 2011

### EmmaSaunders1

Hello,

if B is a positive semi definite matrix, how can you complete the square around B from

x'Bx + x'Cy + y'C'x, where C is also a matrix.

The answer is (x+B^-1Cy)'B(x+B^-1Cy) + y'C'B^-1Cy

I have not come across completing the square using matrix notation before - thoughts appreciated.

Thanks

2. Jul 29, 2011

### tiny-tim

Hello Emma!

(try using the X2 icon just above the Reply box )

I don't think I'd call that "completing the square", since it's the sum of two squares.

But you can easily check it (there seems to be an error ) using (B-1Cy)' = y'C'B-1'