Is there a math operator to see if all vector element values are positive?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












So I want to check if all vector values are positive and if they are get 1 else a 0. Is there an operator for that or one must use a picewize function?



So
$P[1,2,0]^t = 1$



while



$P[-1,0,0]^t = 0$







share|cite|improve this question






















  • Please give an example of when a "vector value is positive".
    – coffeemath
    Aug 13 at 3:20














up vote
0
down vote

favorite
1












So I want to check if all vector values are positive and if they are get 1 else a 0. Is there an operator for that or one must use a picewize function?



So
$P[1,2,0]^t = 1$



while



$P[-1,0,0]^t = 0$







share|cite|improve this question






















  • Please give an example of when a "vector value is positive".
    – coffeemath
    Aug 13 at 3:20












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





So I want to check if all vector values are positive and if they are get 1 else a 0. Is there an operator for that or one must use a picewize function?



So
$P[1,2,0]^t = 1$



while



$P[-1,0,0]^t = 0$







share|cite|improve this question














So I want to check if all vector values are positive and if they are get 1 else a 0. Is there an operator for that or one must use a picewize function?



So
$P[1,2,0]^t = 1$



while



$P[-1,0,0]^t = 0$









share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Aug 13 at 3:22

























asked Aug 13 at 3:18









DuckQueen

1377




1377











  • Please give an example of when a "vector value is positive".
    – coffeemath
    Aug 13 at 3:20
















  • Please give an example of when a "vector value is positive".
    – coffeemath
    Aug 13 at 3:20















Please give an example of when a "vector value is positive".
– coffeemath
Aug 13 at 3:20




Please give an example of when a "vector value is positive".
– coffeemath
Aug 13 at 3:20










2 Answers
2






active

oldest

votes

















up vote
1
down vote













To test whether each component is positive is equivalent to testing if the minimum is positive.:$$Px = mathbb1_min_i x_i >0$$






share|cite|improve this answer



























    up vote
    0
    down vote













    If the vector $vec P$ has $N$ components then



    $$ T equiv sum_k=1^N big ( |P_k|-P_k big) =0 $$



    if and only if all components are non-negative.



    a function that gives the values you want can be expressed as $(T = 0)$ understood as a boolean function returning 1 for true and 0 for false






    share|cite|improve this answer




















      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%2f2880963%2fis-there-a-math-operator-to-see-if-all-vector-element-values-are-positive%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
      1
      down vote













      To test whether each component is positive is equivalent to testing if the minimum is positive.:$$Px = mathbb1_min_i x_i >0$$






      share|cite|improve this answer
























        up vote
        1
        down vote













        To test whether each component is positive is equivalent to testing if the minimum is positive.:$$Px = mathbb1_min_i x_i >0$$






        share|cite|improve this answer






















          up vote
          1
          down vote










          up vote
          1
          down vote









          To test whether each component is positive is equivalent to testing if the minimum is positive.:$$Px = mathbb1_min_i x_i >0$$






          share|cite|improve this answer












          To test whether each component is positive is equivalent to testing if the minimum is positive.:$$Px = mathbb1_min_i x_i >0$$







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Aug 13 at 3:28









          Siong Thye Goh

          78.8k134997




          78.8k134997




















              up vote
              0
              down vote













              If the vector $vec P$ has $N$ components then



              $$ T equiv sum_k=1^N big ( |P_k|-P_k big) =0 $$



              if and only if all components are non-negative.



              a function that gives the values you want can be expressed as $(T = 0)$ understood as a boolean function returning 1 for true and 0 for false






              share|cite|improve this answer
























                up vote
                0
                down vote













                If the vector $vec P$ has $N$ components then



                $$ T equiv sum_k=1^N big ( |P_k|-P_k big) =0 $$



                if and only if all components are non-negative.



                a function that gives the values you want can be expressed as $(T = 0)$ understood as a boolean function returning 1 for true and 0 for false






                share|cite|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  If the vector $vec P$ has $N$ components then



                  $$ T equiv sum_k=1^N big ( |P_k|-P_k big) =0 $$



                  if and only if all components are non-negative.



                  a function that gives the values you want can be expressed as $(T = 0)$ understood as a boolean function returning 1 for true and 0 for false






                  share|cite|improve this answer












                  If the vector $vec P$ has $N$ components then



                  $$ T equiv sum_k=1^N big ( |P_k|-P_k big) =0 $$



                  if and only if all components are non-negative.



                  a function that gives the values you want can be expressed as $(T = 0)$ understood as a boolean function returning 1 for true and 0 for false







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Aug 13 at 3:46









                  WW1

                  6,4821712




                  6,4821712






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2880963%2fis-there-a-math-operator-to-see-if-all-vector-element-values-are-positive%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