Minimize a matrix

The name of the pictureThe name of the pictureThe name of the pictureClash 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$







share|cite|improve this question






















  • 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














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$







share|cite|improve this question






















  • 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












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$







share|cite|improve this question














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$









share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








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
















  • 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










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$$






share|cite|improve this answer



























    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.






    share|cite|improve this answer






















    • -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










    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    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






























    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$$






    share|cite|improve this answer
























      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$$






      share|cite|improve this answer






















        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$$






        share|cite|improve this answer












        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$$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Aug 25 at 2:32









        Siong Thye Goh

        80.6k1453102




        80.6k1453102




















            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.






            share|cite|improve this answer






















            • -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














            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.






            share|cite|improve this answer






















            • -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












            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.






            share|cite|improve this answer














            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.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            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
















            • -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

















             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            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













































































            這個網誌中的熱門文章

            tkz-euclide: tkzDrawCircle[R] not working

            How to combine Bézier curves to a surface?

            1st Magritte Awards