Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to input a determinant

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15941] Re: How to input a determinant
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Wed, 17 Feb 1999 23:34:06 -0500
  • Organization: University of Western Australia
  • References: <7a28pk$1nv@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Chee Lim Cheung wrote:

> I was teaching Cramer's rule using Mathematica and one of my students
> asked me how to input a determinant in the traditional way using
> Mathematica. I wish the determinant A of order 2, 3 or higher to appear
> like |A| with the elements enclosed between two vertical bars by the
> side. Is there a clean way to do this in Mathematica?

If you use TraditionalForm for your Default Input and Output FormatType
(under the Cell menu) then this is easily possible. The following
Notebook gives an example of what you are after.

Cheers,
	Paul

Notebook[{

Cell[CellGroupData[{
Cell[BoxData[
    FormBox[
      TagBox[
        RowBox[{"\[LeftBracketingBar]", 
          TagBox[GridBox[{
                {"a", "b"},
                {"c", "d"}
                }],
            (TableForm[ #, TableDepth -> 0]&)],
"\[RightBracketingBar]"}],
        {Det}], TraditionalForm]], "Input"],

Cell[BoxData[
    \(TraditionalForm\`a\ d - b\ c\)], "Output"]
}, Open  ]],

Cell[BoxData[
    FormBox[
      RowBox[{
        RowBox[{"A", "=", 
          RowBox[{"(", GridBox[{
                {"a", "b"},
                {"c", "d"}
                }], ")"}]}], ";"}], TraditionalForm]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
    FormBox[
      TagBox[
        RowBox[{"\[LeftBracketingBar]", 
          TagBox["A",
            (TableForm[ #, TableDepth -> 0]&)],
"\[RightBracketingBar]"}],
        {Det}], TraditionalForm]], "Input"],

Cell[BoxData[
    \(TraditionalForm\`a\ d - b\ c\)], "Output"]
}, Open  ]]
}
]


____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia           
Nedlands WA  6907                     mailto:paul at physics.uwa.edu.au 
AUSTRALIA                        http://www.physics.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________


  • Prev by Date: Re: Compiling a Module
  • Next by Date: Re: 3D List Plots
  • Previous by thread: How to input a determinant
  • Next by thread: QM,physics, mathematica