(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 9.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 157, 7] NotebookDataLength[ 4191, 181] NotebookOptionsPosition[ 3112, 137] NotebookOutlinePosition[ 3463, 153] CellTagsIndexPosition[ 3420, 150] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Projection Matrix", "Title"], Cell[CellGroupData[{ Cell["Author", "Subsection"], Cell["\<\ Eric W. Weisstein Spectember 3, 2002\ \>", "Text"], Cell[TextData[{ "This notebook downloaded from ", ButtonBox["http://mathworld.wolfram.com/notebooks/LinearAlgebra/\ ProjectionMatrix.nb", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://mathworld.wolfram.com/notebooks/LinearAlgebra/\ ProjectionMatrix.nb"], None}], "." }], "Text"], Cell[TextData[{ "For more information, see Eric's ", StyleBox["MathWorld", FontSlant->"Italic"], " entry ", ButtonBox["http://mathworld.wolfram.com/ProjectionMatrix.html", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://mathworld.wolfram.com/ProjectionMatrix.html"], None}], "." }], "Text"], Cell["\<\ \[Copyright]2005 Wolfram Research, Inc. except for portions noted otherwise\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Additional Authors", "Subsection"], Cell["\<\ Code by Todd Rowland May 5, 2000\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Initialization", "Subsection"], Cell[BoxData[ RowBox[{ RowBox[{"<<", "LinearAlgebra`Orthogonalization`"}], ";"}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Code", "Subsection"], Cell[BoxData[ RowBox[{ RowBox[{"ProjectionMatrixQ", "[", RowBox[{"a_List", "?", "MatrixQ"}], "]"}], ":=", RowBox[{"(", RowBox[{ RowBox[{"a", ".", "a"}], "\[Equal]", "a"}], ")"}]}]], "Input"], Cell["\<\ Gives the Hermitian projection matrix onto a complex subspace, given a basis.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"HermitianProjectMatrixOntoBasis", "[", RowBox[{"a_List", "?", "MatrixQ"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"a1", "=", RowBox[{"GramSchmidt", "[", RowBox[{"a", ",", RowBox[{"InnerProduct", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"#1", ".", RowBox[{"Conjugate", "[", "#2", "]"}]}], "&"}], ")"}]}]}], "]"}]}], "}"}], ",", RowBox[{ RowBox[{"Transpose", "[", "a1", "]"}], ".", "a1"}]}], "\[IndentingNewLine]", "]"}]}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Examples", "Section"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ProjectionMatrixQ", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], "}"}], "]"}]], "Input"], Cell[BoxData["True"], "Output"] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{520, 624}, WindowMargins->{{Automatic, 0}, {Automatic, 0}}, FrontEndVersion->"9.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 5, \ 2013)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 34, 0, 92, "Title"], Cell[CellGroupData[{ Cell[638, 26, 28, 0, 44, "Subsection"], Cell[669, 28, 60, 3, 49, "Text"], Cell[732, 33, 293, 9, 68, "Text"], Cell[1028, 44, 307, 10, 49, "Text"], Cell[1338, 56, 99, 2, 49, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[1474, 63, 40, 0, 44, "Subsection"], Cell[1517, 65, 56, 3, 49, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[1610, 73, 36, 0, 44, "Subsection"], Cell[1649, 75, 94, 2, 28, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[1780, 82, 26, 0, 44, "Subsection"], Cell[1809, 84, 208, 6, 28, "Input"], Cell[2020, 92, 102, 2, 49, "Text"], Cell[2125, 96, 605, 18, 114, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[2767, 119, 27, 0, 80, "Section"], Cell[CellGroupData[{ Cell[2819, 123, 219, 7, 28, "Input"], Cell[3041, 132, 31, 0, 28, "Output"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)