Do all projections matrices take this form?












4














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



























    4














    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

























      4












      4








      4


      1





      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













      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 Cudi

      456




      456






















          2 Answers
          2






          active

          oldest

          votes


















          9














          $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



















          • 1




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










          • 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.
            – amd
            2 days ago










          • @amd I am. This is the usual setting when this kind of projections are encountered.
            – user1551
            2 days ago



















          3














          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























          • So it isn't necessarily true that all projection matrices take that form?
            – 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














          $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



















          • 1




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










          • 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.
            – amd
            2 days ago










          • @amd I am. This is the usual setting when this kind of projections are encountered.
            – user1551
            2 days ago
















          9














          $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



















          • 1




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










          • 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.
            – amd
            2 days ago










          • @amd I am. This is the usual setting when this kind of projections are encountered.
            – user1551
            2 days ago














          9












          9








          9






          $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














          $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 2 days ago

























          answered Jan 1 at 13:46









          user1551

          71.6k566125




          71.6k566125








          • 1




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










          • 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.
            – amd
            2 days ago










          • @amd I am. This is the usual setting when this kind of projections are encountered.
            – user1551
            2 days ago














          • 1




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










          • 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.
            – amd
            2 days ago










          • @amd I am. This is the usual setting when this kind of projections are encountered.
            – user1551
            2 days ago








          1




          1




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




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












          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.
          – amd
          2 days ago




          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.
          – amd
          2 days ago












          @amd I am. This is the usual setting when this kind of projections are encountered.
          – user1551
          2 days ago




          @amd I am. This is the usual setting when this kind of projections are encountered.
          – user1551
          2 days ago











          3














          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























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
















          3














          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























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














          3












          3








          3






          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














          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









          littleO

          29.2k644109




          29.2k644109












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


















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
















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




          So it isn't necessarily true that all projection matrices take that form?
          – 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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


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


          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

          Список кардиналов, возведённых папой римским Каликстом III

          Deduzione

          Mysql.sock missing - “Can't connect to local MySQL server through socket”