Minimize a matrix

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Given
beginequation
X^TAX =
left(beginarraycc x_1 & x_2 endarrayright)
left(beginarraycc 1.5 & 1\ 1 & 2 endarrayright)
left(beginarrayc x_1 \ x_2 endarrayright)
=
endequation
Find $x_1$ and $x_2$ ratios that will minimize $X^TAX$ subject to $x_1+x_2=1$
linear-algebra matrices
add a comment |Â
up vote
0
down vote
favorite
Given
beginequation
X^TAX =
left(beginarraycc x_1 & x_2 endarrayright)
left(beginarraycc 1.5 & 1\ 1 & 2 endarrayright)
left(beginarrayc x_1 \ x_2 endarrayright)
=
endequation
Find $x_1$ and $x_2$ ratios that will minimize $X^TAX$ subject to $x_1+x_2=1$
linear-algebra matrices
you want an eigenvector for the smallest eigenvalue.
â Will Jagy
Aug 25 at 2:19
Thank you, how would the problem change if we introduced a constraint as i have shown above?
â irinaisawesome
Aug 25 at 2:27
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Given
beginequation
X^TAX =
left(beginarraycc x_1 & x_2 endarrayright)
left(beginarraycc 1.5 & 1\ 1 & 2 endarrayright)
left(beginarrayc x_1 \ x_2 endarrayright)
=
endequation
Find $x_1$ and $x_2$ ratios that will minimize $X^TAX$ subject to $x_1+x_2=1$
linear-algebra matrices
Given
beginequation
X^TAX =
left(beginarraycc x_1 & x_2 endarrayright)
left(beginarraycc 1.5 & 1\ 1 & 2 endarrayright)
left(beginarrayc x_1 \ x_2 endarrayright)
=
endequation
Find $x_1$ and $x_2$ ratios that will minimize $X^TAX$ subject to $x_1+x_2=1$
linear-algebra matrices
edited Aug 25 at 2:26
asked Aug 25 at 2:11
irinaisawesome
82
82
you want an eigenvector for the smallest eigenvalue.
â Will Jagy
Aug 25 at 2:19
Thank you, how would the problem change if we introduced a constraint as i have shown above?
â irinaisawesome
Aug 25 at 2:27
add a comment |Â
you want an eigenvector for the smallest eigenvalue.
â Will Jagy
Aug 25 at 2:19
Thank you, how would the problem change if we introduced a constraint as i have shown above?
â irinaisawesome
Aug 25 at 2:27
you want an eigenvector for the smallest eigenvalue.
â Will Jagy
Aug 25 at 2:19
you want an eigenvector for the smallest eigenvalue.
â Will Jagy
Aug 25 at 2:19
Thank you, how would the problem change if we introduced a constraint as i have shown above?
â irinaisawesome
Aug 25 at 2:27
Thank you, how would the problem change if we introduced a constraint as i have shown above?
â irinaisawesome
Aug 25 at 2:27
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
Guide:
The quesiton is equivalent to
$$min 1.5x_1^2 + 2x_1x_2 + 2x_2^2$$
subject to $x_1+x_2=1$.
Once we perform a substitution, reduce the problem to a one dimensional quadratic optimization problem.
$$min 1.5x_1^2 + 2x_1(1-x_1) + 2(1-x_1)^2$$
add a comment |Â
up vote
-1
down vote
Another way is to write
$$x_1+x_2=1$$ as $$bf SX-1=0, text where bf S = [1,1]$$
This will be solved where $min_Xbf SX-1$
So you can add this term to the minimization:
$$bf X_o = min_Xbf SX-1$$
Edit Sloppily, I forgot to mention that we need parameter $epsilon$ to say how much more important the fit to equality is than to minimize the first term. $epsilon=10^3$ seems to work well enough here.
If you are still skeptical, we can derive the solution and type it into Octave:
A = [1.5,1;1,2];
S = [1,1];
lhs = A + 1e3*S'*S;
rhs = [1e3*S'*1];
Xo = [lhsrhs]'
displays result
0.66578 0.33289
pretty close to the real solution [2/3 1/3]. If you don't have Octave and you can't install it, there apparently exists something called Octave Online, where you can type it in.
This approach is useful in case you have more similar constraints or costs you want to enforce at the same time. You can systematically stuff the linear combinations into such $bf S$ matrices. Nice if you have like 1000 000 dimensions and 1000 constraints to keep track of.
-1: This does not solve the original problem, because the minimum $X_o$ does not satisfy $x_1+x_2=1$.
â Rahul
Aug 25 at 10:56
@Rahul You will just need to weight the scalar product term higher to enforce the equality more harshly, but it will solve it. $bf SX$ is the scalar product $1cdot x_1 + 1cdot x_2$. Just try $epsilon |bf SX -1|_2^2$ for $epsilon=10^3$
â mathreadler
Aug 25 at 11:31
@Rahul now it does, you can check it for yourself given the link i posted.
â mathreadler
Aug 27 at 15:59
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Guide:
The quesiton is equivalent to
$$min 1.5x_1^2 + 2x_1x_2 + 2x_2^2$$
subject to $x_1+x_2=1$.
Once we perform a substitution, reduce the problem to a one dimensional quadratic optimization problem.
$$min 1.5x_1^2 + 2x_1(1-x_1) + 2(1-x_1)^2$$
add a comment |Â
up vote
2
down vote
accepted
Guide:
The quesiton is equivalent to
$$min 1.5x_1^2 + 2x_1x_2 + 2x_2^2$$
subject to $x_1+x_2=1$.
Once we perform a substitution, reduce the problem to a one dimensional quadratic optimization problem.
$$min 1.5x_1^2 + 2x_1(1-x_1) + 2(1-x_1)^2$$
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Guide:
The quesiton is equivalent to
$$min 1.5x_1^2 + 2x_1x_2 + 2x_2^2$$
subject to $x_1+x_2=1$.
Once we perform a substitution, reduce the problem to a one dimensional quadratic optimization problem.
$$min 1.5x_1^2 + 2x_1(1-x_1) + 2(1-x_1)^2$$
Guide:
The quesiton is equivalent to
$$min 1.5x_1^2 + 2x_1x_2 + 2x_2^2$$
subject to $x_1+x_2=1$.
Once we perform a substitution, reduce the problem to a one dimensional quadratic optimization problem.
$$min 1.5x_1^2 + 2x_1(1-x_1) + 2(1-x_1)^2$$
answered Aug 25 at 2:32
Siong Thye Goh
80.6k1453102
80.6k1453102
add a comment |Â
add a comment |Â
up vote
-1
down vote
Another way is to write
$$x_1+x_2=1$$ as $$bf SX-1=0, text where bf S = [1,1]$$
This will be solved where $min_Xbf SX-1$
So you can add this term to the minimization:
$$bf X_o = min_Xbf SX-1$$
Edit Sloppily, I forgot to mention that we need parameter $epsilon$ to say how much more important the fit to equality is than to minimize the first term. $epsilon=10^3$ seems to work well enough here.
If you are still skeptical, we can derive the solution and type it into Octave:
A = [1.5,1;1,2];
S = [1,1];
lhs = A + 1e3*S'*S;
rhs = [1e3*S'*1];
Xo = [lhsrhs]'
displays result
0.66578 0.33289
pretty close to the real solution [2/3 1/3]. If you don't have Octave and you can't install it, there apparently exists something called Octave Online, where you can type it in.
This approach is useful in case you have more similar constraints or costs you want to enforce at the same time. You can systematically stuff the linear combinations into such $bf S$ matrices. Nice if you have like 1000 000 dimensions and 1000 constraints to keep track of.
-1: This does not solve the original problem, because the minimum $X_o$ does not satisfy $x_1+x_2=1$.
â Rahul
Aug 25 at 10:56
@Rahul You will just need to weight the scalar product term higher to enforce the equality more harshly, but it will solve it. $bf SX$ is the scalar product $1cdot x_1 + 1cdot x_2$. Just try $epsilon |bf SX -1|_2^2$ for $epsilon=10^3$
â mathreadler
Aug 25 at 11:31
@Rahul now it does, you can check it for yourself given the link i posted.
â mathreadler
Aug 27 at 15:59
add a comment |Â
up vote
-1
down vote
Another way is to write
$$x_1+x_2=1$$ as $$bf SX-1=0, text where bf S = [1,1]$$
This will be solved where $min_Xbf SX-1$
So you can add this term to the minimization:
$$bf X_o = min_Xbf SX-1$$
Edit Sloppily, I forgot to mention that we need parameter $epsilon$ to say how much more important the fit to equality is than to minimize the first term. $epsilon=10^3$ seems to work well enough here.
If you are still skeptical, we can derive the solution and type it into Octave:
A = [1.5,1;1,2];
S = [1,1];
lhs = A + 1e3*S'*S;
rhs = [1e3*S'*1];
Xo = [lhsrhs]'
displays result
0.66578 0.33289
pretty close to the real solution [2/3 1/3]. If you don't have Octave and you can't install it, there apparently exists something called Octave Online, where you can type it in.
This approach is useful in case you have more similar constraints or costs you want to enforce at the same time. You can systematically stuff the linear combinations into such $bf S$ matrices. Nice if you have like 1000 000 dimensions and 1000 constraints to keep track of.
-1: This does not solve the original problem, because the minimum $X_o$ does not satisfy $x_1+x_2=1$.
â Rahul
Aug 25 at 10:56
@Rahul You will just need to weight the scalar product term higher to enforce the equality more harshly, but it will solve it. $bf SX$ is the scalar product $1cdot x_1 + 1cdot x_2$. Just try $epsilon |bf SX -1|_2^2$ for $epsilon=10^3$
â mathreadler
Aug 25 at 11:31
@Rahul now it does, you can check it for yourself given the link i posted.
â mathreadler
Aug 27 at 15:59
add a comment |Â
up vote
-1
down vote
up vote
-1
down vote
Another way is to write
$$x_1+x_2=1$$ as $$bf SX-1=0, text where bf S = [1,1]$$
This will be solved where $min_Xbf SX-1$
So you can add this term to the minimization:
$$bf X_o = min_Xbf SX-1$$
Edit Sloppily, I forgot to mention that we need parameter $epsilon$ to say how much more important the fit to equality is than to minimize the first term. $epsilon=10^3$ seems to work well enough here.
If you are still skeptical, we can derive the solution and type it into Octave:
A = [1.5,1;1,2];
S = [1,1];
lhs = A + 1e3*S'*S;
rhs = [1e3*S'*1];
Xo = [lhsrhs]'
displays result
0.66578 0.33289
pretty close to the real solution [2/3 1/3]. If you don't have Octave and you can't install it, there apparently exists something called Octave Online, where you can type it in.
This approach is useful in case you have more similar constraints or costs you want to enforce at the same time. You can systematically stuff the linear combinations into such $bf S$ matrices. Nice if you have like 1000 000 dimensions and 1000 constraints to keep track of.
Another way is to write
$$x_1+x_2=1$$ as $$bf SX-1=0, text where bf S = [1,1]$$
This will be solved where $min_Xbf SX-1$
So you can add this term to the minimization:
$$bf X_o = min_Xbf SX-1$$
Edit Sloppily, I forgot to mention that we need parameter $epsilon$ to say how much more important the fit to equality is than to minimize the first term. $epsilon=10^3$ seems to work well enough here.
If you are still skeptical, we can derive the solution and type it into Octave:
A = [1.5,1;1,2];
S = [1,1];
lhs = A + 1e3*S'*S;
rhs = [1e3*S'*1];
Xo = [lhsrhs]'
displays result
0.66578 0.33289
pretty close to the real solution [2/3 1/3]. If you don't have Octave and you can't install it, there apparently exists something called Octave Online, where you can type it in.
This approach is useful in case you have more similar constraints or costs you want to enforce at the same time. You can systematically stuff the linear combinations into such $bf S$ matrices. Nice if you have like 1000 000 dimensions and 1000 constraints to keep track of.
edited Aug 25 at 11:51
answered Aug 25 at 7:10
mathreadler
13.8k71957
13.8k71957
-1: This does not solve the original problem, because the minimum $X_o$ does not satisfy $x_1+x_2=1$.
â Rahul
Aug 25 at 10:56
@Rahul You will just need to weight the scalar product term higher to enforce the equality more harshly, but it will solve it. $bf SX$ is the scalar product $1cdot x_1 + 1cdot x_2$. Just try $epsilon |bf SX -1|_2^2$ for $epsilon=10^3$
â mathreadler
Aug 25 at 11:31
@Rahul now it does, you can check it for yourself given the link i posted.
â mathreadler
Aug 27 at 15:59
add a comment |Â
-1: This does not solve the original problem, because the minimum $X_o$ does not satisfy $x_1+x_2=1$.
â Rahul
Aug 25 at 10:56
@Rahul You will just need to weight the scalar product term higher to enforce the equality more harshly, but it will solve it. $bf SX$ is the scalar product $1cdot x_1 + 1cdot x_2$. Just try $epsilon |bf SX -1|_2^2$ for $epsilon=10^3$
â mathreadler
Aug 25 at 11:31
@Rahul now it does, you can check it for yourself given the link i posted.
â mathreadler
Aug 27 at 15:59
-1: This does not solve the original problem, because the minimum $X_o$ does not satisfy $x_1+x_2=1$.
â Rahul
Aug 25 at 10:56
-1: This does not solve the original problem, because the minimum $X_o$ does not satisfy $x_1+x_2=1$.
â Rahul
Aug 25 at 10:56
@Rahul You will just need to weight the scalar product term higher to enforce the equality more harshly, but it will solve it. $bf SX$ is the scalar product $1cdot x_1 + 1cdot x_2$. Just try $epsilon |bf SX -1|_2^2$ for $epsilon=10^3$
â mathreadler
Aug 25 at 11:31
@Rahul You will just need to weight the scalar product term higher to enforce the equality more harshly, but it will solve it. $bf SX$ is the scalar product $1cdot x_1 + 1cdot x_2$. Just try $epsilon |bf SX -1|_2^2$ for $epsilon=10^3$
â mathreadler
Aug 25 at 11:31
@Rahul now it does, you can check it for yourself given the link i posted.
â mathreadler
Aug 27 at 15:59
@Rahul now it does, you can check it for yourself given the link i posted.
â mathreadler
Aug 27 at 15:59
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2893745%2fminimize-a-matrix%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
you want an eigenvector for the smallest eigenvalue.
â Will Jagy
Aug 25 at 2:19
Thank you, how would the problem change if we introduced a constraint as i have shown above?
â irinaisawesome
Aug 25 at 2:27