# Thread: lagrange multipliers problem: find 2x2 matrix with determinant = 1 closest to...

1. ## lagrange multipliers problem: find 2x2 matrix with determinant = 1 closest to...

a) Show that the set X of all 2x2 matrices with determinant = 1 is a smooth manifold. What is its dimension?

so i associated a 2x2 matrix with entries a11= x, a12 = y, a21 = w, and a22 = z to a vector in R^4 (x, y, w, z). so the function f (x, y, w, z) = xz-yw = 1. i took the derivative of this function and i got the row matrix [z -w -y x] and the linear transformation represented by this matrix is onto since at least one of the entries has to be nonzero for the determinant to equal 1 so this is a smooth manifold of dimension 3.

b) find a matrix in X that is closest to the matrix with entries a11 = 0, a12 = 1, a21 = 1, and a22 = 0.

the function i want to minimize is F(x,y,w,z) = x^2 + (y-1)^2 + (w-1)^2 + z^2. basically i want to minimize the distance between some matrix and the matrix described in part b).

so using lagrange multipliers i find the following equations:
2x=λz2y-2=-λw
2w-2=-λy
2z=λxxz-yw = 1

maybe its just that its getting late but i seem to have trouble solving this system.
so i substituted from the first equation into the 4th one so i get 4z = (λ^2)z then i get (λ^2 - 4)z = 0. so if z = 0, then x = 0 as well and yw = -1. then i eliminate the λ between the 2nd and 3rd equations and substitute w = -1/y and after much simplifying i get y^4 - y^3 - y - 1 = 0 which i don't think has real solutions. going down the other route and assuming that λ = 2, then x = z and y + w = 1. i think i'm getting stuck around here as i don't know how to get numerical solutions. all i have is just variables in terms of other variables so far. is this the way to solve it or is there a better way?

2. That's a nice little problem! I get, as you do, $\displaystyle 2x= \lambda z$, $\displaystyle 2(y- 1)= -\lambda w$, $\displaystyle 2(w- 1)= -\lambda y$, and $\displaystyle 2z= \lambda x$.

Since the value of $\displaystyle \lambda$ is not part of the solution, I often find that eliminating it first by dividing one equation by another is helpful.

For example, dividing the first equation, $\displaystyle 2x= \lambda z$, by the fourth, $\displaystyle 2z= \lambda x$, gives $\displaystyle \frac{2x}{2z}= \frac{\lambda z}{\lambda x}$ or $\displaystyle \frac{x}{z}= \frac{z}{x}$ which reduces to $\displaystyle x^2= z^2$. That is, either z= x or z= -x.

Similarly, dividing the second equation, $\displaystyle 2(y-1)= -\lambda w$, by the third, $\displaystyle 2(w-1)= -\lambda y$, gives $\displaystyle \frac{2(y- 1)}{2(w- 1)}= \frac{-\lambda w}{-\lambda y}$ or $\displaystyle \frac{y-1}{w- 1}= \frac{w}{y}$ which reduces to $\displaystyle y(y- 1)= y^2- y= w(w-1)= w^2- w$. We can rewrite that as $\displaystyle y^2- w^2= (y- w)(y+ w)= y- w$ and so either y= w or y+ w= 1 which gives y= 1- w.

So we have 4 possible combinations:
1) z= x and y= w
2) z= x and y= 1- w
3) z= -x and y= w
4) z= -x and y= 1- w

Putting each of those into the constraint xz- wy= 1 will give solutions. There is, of course, no one matrix that will work- there is a set of matrices with determinant 1 that are equally close to the given matrix.

3. thank you for the helpful post!

4. ## Re: lagrange multipliers problem: find 2x2 matrix with determinant = 1 closest to...

Simple question probably but I am wondering how you applied the Lagrange multipliers to get those equations? I know the one side of the equations are the partial derivatives. But why are some of the lambdas negative?

[EDIT] nevermind I get it because of the constraint function.