Do all projections matrices take this form?












4












$begingroup$


Do all projection matrices take the form $P = A{(A^TA)}^{-1}A^T$? If so, can you help me derive it and explain it intuitively?










share|cite|improve this question









$endgroup$

















    4












    $begingroup$


    Do all projection matrices take the form $P = A{(A^TA)}^{-1}A^T$? If so, can you help me derive it and explain it intuitively?










    share|cite|improve this question









    $endgroup$















      4












      4








      4


      1



      $begingroup$


      Do all projection matrices take the form $P = A{(A^TA)}^{-1}A^T$? If so, can you help me derive it and explain it intuitively?










      share|cite|improve this question









      $endgroup$




      Do all projection matrices take the form $P = A{(A^TA)}^{-1}A^T$? If so, can you help me derive it and explain it intuitively?







      linear-algebra matrices projective-geometry






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Jan 1 at 11:58









      Kid CudiKid Cudi

      456




      456






















          2 Answers
          2






          active

          oldest

          votes


















          9












          $begingroup$

          $A(A^TA)^{-1}A^T$ is symmetric, but not all projection matrices are symmetric --- such as $pmatrix{1&1\ 0&0}$. Thus the answer is clearly no.



          It is true, however, that all orthogonal (with respect to the usual inner product) projection matrices over $mathbb R$ can be written in the form of $A(A^TA)^{-1}A^T$. By definition, if $Pin M_n(mathbb R)$ is an orthogonal projection, then $P|_U=operatorname{id}$ and $P|_{U^perp}=0$ for some subspace $Usubseteqmathbb R^n$. Let $A$ be any matrix whose columns form a basis of $U$ (any basis will do; it doesn't have to be orthonormal). Then $A^TA$ is nonsingular and $A(A^TA)^{-1}A^Tv=0$ for every $vin U^perp$. Also, since the columns of $A$ span $U$, every vector $uin U$ can be written as $Ax$ for some $xinmathbb R^n$. Therefore
          $$
          left(A(A^TA)^{-1}A^Tright)u=left(A(A^TA)^{-1}A^Tright)(Ax)=left(A(A^TA)^{-1}A^TAright)x=Ax=u
          $$

          for every $u=Axin U$. Hence $P$ and $A(A^TA)^{-1}A^T$ agree everywhere on $mathbb R^n$, i.e. $P=A(A^TA)^{-1}A^T$.






          share|cite|improve this answer











          $endgroup$









          • 1




            $begingroup$
            Thanks, I learned something from your answer -- I had forgotten that a projection matrix does not have to be an orthogonal projection matrix.
            $endgroup$
            – littleO
            Jan 1 at 15:24










          • $begingroup$
            You appear to be assuming the standard basis and Euclidean scalar product. In a different basis of the ambient space or with a different scalar product, the expression still yields the matrix of a projection ($P^2=P$ always), but it’s not likely to be orthogonal.
            $endgroup$
            – amd
            Jan 2 at 7:05










          • $begingroup$
            @amd I am. This is the usual setting when this kind of projections are encountered.
            $endgroup$
            – user1551
            Jan 2 at 9:36



















          3












          $begingroup$

          As pointed out by @user1551, this is only true for orthogonal projection matrices.



          Let $P$ be the orthogonal projection operator that projects a vector $b in mathbb R^n$ onto a subspace $S subset mathbb R^n$. Let $(a_1,ldots,a_m)$ be a basis for $S$, and let $A$ be the matrix whose $i$th column is $a_i$. Then $S ={Ax mid x in mathbb R^m}$, and projecting $b$ onto $S$ is equivalent to selecting $x$ so as to minimize the distance from $b$ to $Ax$. Equivalently, we want to minimize
          $$
          r(x) = | Ax - b |^2.
          $$

          This is a least squares problem.
          Setting the gradient equal to $0$, we find that $x$ satisfies
          $$
          tag{1} A^T(Ax-b) = 0
          $$

          or equivalently
          $$A^TA x = A^T b.$$
          (This system of equations is often called the "normal equations". Visually, equation (1) just says that the residual vector $b - Ax$ is orthogonal to the column space of $A$.)



          It follows that $x = (A^T A)^{-1} A^T b$. So the projection of $b$ onto $S$ is
          $$
          P(x) = Ax = A(A^T A)^{-1} A^T b.
          $$






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            So it isn't necessarily true that all projection matrices take that form?
            $endgroup$
            – Kid Cudi
            Jan 1 at 13:05











          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          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%2f3058425%2fdo-all-projections-matrices-take-this-form%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          9












          $begingroup$

          $A(A^TA)^{-1}A^T$ is symmetric, but not all projection matrices are symmetric --- such as $pmatrix{1&1\ 0&0}$. Thus the answer is clearly no.



          It is true, however, that all orthogonal (with respect to the usual inner product) projection matrices over $mathbb R$ can be written in the form of $A(A^TA)^{-1}A^T$. By definition, if $Pin M_n(mathbb R)$ is an orthogonal projection, then $P|_U=operatorname{id}$ and $P|_{U^perp}=0$ for some subspace $Usubseteqmathbb R^n$. Let $A$ be any matrix whose columns form a basis of $U$ (any basis will do; it doesn't have to be orthonormal). Then $A^TA$ is nonsingular and $A(A^TA)^{-1}A^Tv=0$ for every $vin U^perp$. Also, since the columns of $A$ span $U$, every vector $uin U$ can be written as $Ax$ for some $xinmathbb R^n$. Therefore
          $$
          left(A(A^TA)^{-1}A^Tright)u=left(A(A^TA)^{-1}A^Tright)(Ax)=left(A(A^TA)^{-1}A^TAright)x=Ax=u
          $$

          for every $u=Axin U$. Hence $P$ and $A(A^TA)^{-1}A^T$ agree everywhere on $mathbb R^n$, i.e. $P=A(A^TA)^{-1}A^T$.






          share|cite|improve this answer











          $endgroup$









          • 1




            $begingroup$
            Thanks, I learned something from your answer -- I had forgotten that a projection matrix does not have to be an orthogonal projection matrix.
            $endgroup$
            – littleO
            Jan 1 at 15:24










          • $begingroup$
            You appear to be assuming the standard basis and Euclidean scalar product. In a different basis of the ambient space or with a different scalar product, the expression still yields the matrix of a projection ($P^2=P$ always), but it’s not likely to be orthogonal.
            $endgroup$
            – amd
            Jan 2 at 7:05










          • $begingroup$
            @amd I am. This is the usual setting when this kind of projections are encountered.
            $endgroup$
            – user1551
            Jan 2 at 9:36
















          9












          $begingroup$

          $A(A^TA)^{-1}A^T$ is symmetric, but not all projection matrices are symmetric --- such as $pmatrix{1&1\ 0&0}$. Thus the answer is clearly no.



          It is true, however, that all orthogonal (with respect to the usual inner product) projection matrices over $mathbb R$ can be written in the form of $A(A^TA)^{-1}A^T$. By definition, if $Pin M_n(mathbb R)$ is an orthogonal projection, then $P|_U=operatorname{id}$ and $P|_{U^perp}=0$ for some subspace $Usubseteqmathbb R^n$. Let $A$ be any matrix whose columns form a basis of $U$ (any basis will do; it doesn't have to be orthonormal). Then $A^TA$ is nonsingular and $A(A^TA)^{-1}A^Tv=0$ for every $vin U^perp$. Also, since the columns of $A$ span $U$, every vector $uin U$ can be written as $Ax$ for some $xinmathbb R^n$. Therefore
          $$
          left(A(A^TA)^{-1}A^Tright)u=left(A(A^TA)^{-1}A^Tright)(Ax)=left(A(A^TA)^{-1}A^TAright)x=Ax=u
          $$

          for every $u=Axin U$. Hence $P$ and $A(A^TA)^{-1}A^T$ agree everywhere on $mathbb R^n$, i.e. $P=A(A^TA)^{-1}A^T$.






          share|cite|improve this answer











          $endgroup$









          • 1




            $begingroup$
            Thanks, I learned something from your answer -- I had forgotten that a projection matrix does not have to be an orthogonal projection matrix.
            $endgroup$
            – littleO
            Jan 1 at 15:24










          • $begingroup$
            You appear to be assuming the standard basis and Euclidean scalar product. In a different basis of the ambient space or with a different scalar product, the expression still yields the matrix of a projection ($P^2=P$ always), but it’s not likely to be orthogonal.
            $endgroup$
            – amd
            Jan 2 at 7:05










          • $begingroup$
            @amd I am. This is the usual setting when this kind of projections are encountered.
            $endgroup$
            – user1551
            Jan 2 at 9:36














          9












          9








          9





          $begingroup$

          $A(A^TA)^{-1}A^T$ is symmetric, but not all projection matrices are symmetric --- such as $pmatrix{1&1\ 0&0}$. Thus the answer is clearly no.



          It is true, however, that all orthogonal (with respect to the usual inner product) projection matrices over $mathbb R$ can be written in the form of $A(A^TA)^{-1}A^T$. By definition, if $Pin M_n(mathbb R)$ is an orthogonal projection, then $P|_U=operatorname{id}$ and $P|_{U^perp}=0$ for some subspace $Usubseteqmathbb R^n$. Let $A$ be any matrix whose columns form a basis of $U$ (any basis will do; it doesn't have to be orthonormal). Then $A^TA$ is nonsingular and $A(A^TA)^{-1}A^Tv=0$ for every $vin U^perp$. Also, since the columns of $A$ span $U$, every vector $uin U$ can be written as $Ax$ for some $xinmathbb R^n$. Therefore
          $$
          left(A(A^TA)^{-1}A^Tright)u=left(A(A^TA)^{-1}A^Tright)(Ax)=left(A(A^TA)^{-1}A^TAright)x=Ax=u
          $$

          for every $u=Axin U$. Hence $P$ and $A(A^TA)^{-1}A^T$ agree everywhere on $mathbb R^n$, i.e. $P=A(A^TA)^{-1}A^T$.






          share|cite|improve this answer











          $endgroup$



          $A(A^TA)^{-1}A^T$ is symmetric, but not all projection matrices are symmetric --- such as $pmatrix{1&1\ 0&0}$. Thus the answer is clearly no.



          It is true, however, that all orthogonal (with respect to the usual inner product) projection matrices over $mathbb R$ can be written in the form of $A(A^TA)^{-1}A^T$. By definition, if $Pin M_n(mathbb R)$ is an orthogonal projection, then $P|_U=operatorname{id}$ and $P|_{U^perp}=0$ for some subspace $Usubseteqmathbb R^n$. Let $A$ be any matrix whose columns form a basis of $U$ (any basis will do; it doesn't have to be orthonormal). Then $A^TA$ is nonsingular and $A(A^TA)^{-1}A^Tv=0$ for every $vin U^perp$. Also, since the columns of $A$ span $U$, every vector $uin U$ can be written as $Ax$ for some $xinmathbb R^n$. Therefore
          $$
          left(A(A^TA)^{-1}A^Tright)u=left(A(A^TA)^{-1}A^Tright)(Ax)=left(A(A^TA)^{-1}A^TAright)x=Ax=u
          $$

          for every $u=Axin U$. Hence $P$ and $A(A^TA)^{-1}A^T$ agree everywhere on $mathbb R^n$, i.e. $P=A(A^TA)^{-1}A^T$.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Jan 2 at 9:40

























          answered Jan 1 at 13:46









          user1551user1551

          73.8k566129




          73.8k566129








          • 1




            $begingroup$
            Thanks, I learned something from your answer -- I had forgotten that a projection matrix does not have to be an orthogonal projection matrix.
            $endgroup$
            – littleO
            Jan 1 at 15:24










          • $begingroup$
            You appear to be assuming the standard basis and Euclidean scalar product. In a different basis of the ambient space or with a different scalar product, the expression still yields the matrix of a projection ($P^2=P$ always), but it’s not likely to be orthogonal.
            $endgroup$
            – amd
            Jan 2 at 7:05










          • $begingroup$
            @amd I am. This is the usual setting when this kind of projections are encountered.
            $endgroup$
            – user1551
            Jan 2 at 9:36














          • 1




            $begingroup$
            Thanks, I learned something from your answer -- I had forgotten that a projection matrix does not have to be an orthogonal projection matrix.
            $endgroup$
            – littleO
            Jan 1 at 15:24










          • $begingroup$
            You appear to be assuming the standard basis and Euclidean scalar product. In a different basis of the ambient space or with a different scalar product, the expression still yields the matrix of a projection ($P^2=P$ always), but it’s not likely to be orthogonal.
            $endgroup$
            – amd
            Jan 2 at 7:05










          • $begingroup$
            @amd I am. This is the usual setting when this kind of projections are encountered.
            $endgroup$
            – user1551
            Jan 2 at 9:36








          1




          1




          $begingroup$
          Thanks, I learned something from your answer -- I had forgotten that a projection matrix does not have to be an orthogonal projection matrix.
          $endgroup$
          – littleO
          Jan 1 at 15:24




          $begingroup$
          Thanks, I learned something from your answer -- I had forgotten that a projection matrix does not have to be an orthogonal projection matrix.
          $endgroup$
          – littleO
          Jan 1 at 15:24












          $begingroup$
          You appear to be assuming the standard basis and Euclidean scalar product. In a different basis of the ambient space or with a different scalar product, the expression still yields the matrix of a projection ($P^2=P$ always), but it’s not likely to be orthogonal.
          $endgroup$
          – amd
          Jan 2 at 7:05




          $begingroup$
          You appear to be assuming the standard basis and Euclidean scalar product. In a different basis of the ambient space or with a different scalar product, the expression still yields the matrix of a projection ($P^2=P$ always), but it’s not likely to be orthogonal.
          $endgroup$
          – amd
          Jan 2 at 7:05












          $begingroup$
          @amd I am. This is the usual setting when this kind of projections are encountered.
          $endgroup$
          – user1551
          Jan 2 at 9:36




          $begingroup$
          @amd I am. This is the usual setting when this kind of projections are encountered.
          $endgroup$
          – user1551
          Jan 2 at 9:36











          3












          $begingroup$

          As pointed out by @user1551, this is only true for orthogonal projection matrices.



          Let $P$ be the orthogonal projection operator that projects a vector $b in mathbb R^n$ onto a subspace $S subset mathbb R^n$. Let $(a_1,ldots,a_m)$ be a basis for $S$, and let $A$ be the matrix whose $i$th column is $a_i$. Then $S ={Ax mid x in mathbb R^m}$, and projecting $b$ onto $S$ is equivalent to selecting $x$ so as to minimize the distance from $b$ to $Ax$. Equivalently, we want to minimize
          $$
          r(x) = | Ax - b |^2.
          $$

          This is a least squares problem.
          Setting the gradient equal to $0$, we find that $x$ satisfies
          $$
          tag{1} A^T(Ax-b) = 0
          $$

          or equivalently
          $$A^TA x = A^T b.$$
          (This system of equations is often called the "normal equations". Visually, equation (1) just says that the residual vector $b - Ax$ is orthogonal to the column space of $A$.)



          It follows that $x = (A^T A)^{-1} A^T b$. So the projection of $b$ onto $S$ is
          $$
          P(x) = Ax = A(A^T A)^{-1} A^T b.
          $$






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            So it isn't necessarily true that all projection matrices take that form?
            $endgroup$
            – Kid Cudi
            Jan 1 at 13:05
















          3












          $begingroup$

          As pointed out by @user1551, this is only true for orthogonal projection matrices.



          Let $P$ be the orthogonal projection operator that projects a vector $b in mathbb R^n$ onto a subspace $S subset mathbb R^n$. Let $(a_1,ldots,a_m)$ be a basis for $S$, and let $A$ be the matrix whose $i$th column is $a_i$. Then $S ={Ax mid x in mathbb R^m}$, and projecting $b$ onto $S$ is equivalent to selecting $x$ so as to minimize the distance from $b$ to $Ax$. Equivalently, we want to minimize
          $$
          r(x) = | Ax - b |^2.
          $$

          This is a least squares problem.
          Setting the gradient equal to $0$, we find that $x$ satisfies
          $$
          tag{1} A^T(Ax-b) = 0
          $$

          or equivalently
          $$A^TA x = A^T b.$$
          (This system of equations is often called the "normal equations". Visually, equation (1) just says that the residual vector $b - Ax$ is orthogonal to the column space of $A$.)



          It follows that $x = (A^T A)^{-1} A^T b$. So the projection of $b$ onto $S$ is
          $$
          P(x) = Ax = A(A^T A)^{-1} A^T b.
          $$






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            So it isn't necessarily true that all projection matrices take that form?
            $endgroup$
            – Kid Cudi
            Jan 1 at 13:05














          3












          3








          3





          $begingroup$

          As pointed out by @user1551, this is only true for orthogonal projection matrices.



          Let $P$ be the orthogonal projection operator that projects a vector $b in mathbb R^n$ onto a subspace $S subset mathbb R^n$. Let $(a_1,ldots,a_m)$ be a basis for $S$, and let $A$ be the matrix whose $i$th column is $a_i$. Then $S ={Ax mid x in mathbb R^m}$, and projecting $b$ onto $S$ is equivalent to selecting $x$ so as to minimize the distance from $b$ to $Ax$. Equivalently, we want to minimize
          $$
          r(x) = | Ax - b |^2.
          $$

          This is a least squares problem.
          Setting the gradient equal to $0$, we find that $x$ satisfies
          $$
          tag{1} A^T(Ax-b) = 0
          $$

          or equivalently
          $$A^TA x = A^T b.$$
          (This system of equations is often called the "normal equations". Visually, equation (1) just says that the residual vector $b - Ax$ is orthogonal to the column space of $A$.)



          It follows that $x = (A^T A)^{-1} A^T b$. So the projection of $b$ onto $S$ is
          $$
          P(x) = Ax = A(A^T A)^{-1} A^T b.
          $$






          share|cite|improve this answer











          $endgroup$



          As pointed out by @user1551, this is only true for orthogonal projection matrices.



          Let $P$ be the orthogonal projection operator that projects a vector $b in mathbb R^n$ onto a subspace $S subset mathbb R^n$. Let $(a_1,ldots,a_m)$ be a basis for $S$, and let $A$ be the matrix whose $i$th column is $a_i$. Then $S ={Ax mid x in mathbb R^m}$, and projecting $b$ onto $S$ is equivalent to selecting $x$ so as to minimize the distance from $b$ to $Ax$. Equivalently, we want to minimize
          $$
          r(x) = | Ax - b |^2.
          $$

          This is a least squares problem.
          Setting the gradient equal to $0$, we find that $x$ satisfies
          $$
          tag{1} A^T(Ax-b) = 0
          $$

          or equivalently
          $$A^TA x = A^T b.$$
          (This system of equations is often called the "normal equations". Visually, equation (1) just says that the residual vector $b - Ax$ is orthogonal to the column space of $A$.)



          It follows that $x = (A^T A)^{-1} A^T b$. So the projection of $b$ onto $S$ is
          $$
          P(x) = Ax = A(A^T A)^{-1} A^T b.
          $$







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Jan 1 at 15:22

























          answered Jan 1 at 12:33









          littleOlittleO

          30.2k648111




          30.2k648111












          • $begingroup$
            So it isn't necessarily true that all projection matrices take that form?
            $endgroup$
            – Kid Cudi
            Jan 1 at 13:05


















          • $begingroup$
            So it isn't necessarily true that all projection matrices take that form?
            $endgroup$
            – Kid Cudi
            Jan 1 at 13:05
















          $begingroup$
          So it isn't necessarily true that all projection matrices take that form?
          $endgroup$
          – Kid Cudi
          Jan 1 at 13:05




          $begingroup$
          So it isn't necessarily true that all projection matrices take that form?
          $endgroup$
          – Kid Cudi
          Jan 1 at 13:05


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3058425%2fdo-all-projections-matrices-take-this-form%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wiesbaden

          Marschland

          Dieringhausen