Lay Chapter 3,
Determinants

Determinants

Let's write a procedure which creates matrices.

In[1]:=

makeMatrix[n_, m_] := Table[Random[Integer, {-9, 9}], {n}, {m}]

Now generate a few square matrices and calculate their determinants

In[2]:=

Clear[a, b, c] ; 

a = makeMatrix[2, 2] ;

%//MatrixForm

Det[a]

Out[4]//MatrixForm=

( {{8, 8}, {-1, 0}} )

Out[5]=

8

In[6]:=

b = makeMatrix[3, 3] ;

%//MatrixForm

Det[b]

Out[7]//MatrixForm=

( {{0, 4, 5}, {0, 2, -2}, {1, -3, 4}} )

Out[8]=

-18

In[9]:=

c = makeMatrix[4, 4] ;

%//MatrixForm

Det[c]

Out[10]//MatrixForm=

( {{-8, -5, -5, -7}, {-4, -9, -2, -7}, {2, 0, 1, 2}, {7, 7, 2, -4}} )

Out[11]=

312

Determinants in Analytic Geometry

Equation of a Line through Two Points

Use a determinant to find the equation of the line which passes through P(0,1) and Q(1,2).
See Lay's Case Study for chapter 3, "Determinants in Analytic Geometry."

In[12]:=

Clear[m, x, y] ; 

m = ({{x, y, 1}, {0, 1, 1}, {1, 2, 1}}) ; 

Det[m] 0

Out[14]=

-1 - x + y0

In[15]:=

<<Graphics`Graphics`

In[16]:=

DisplayTogether[line = Plot[x + 1, {x, -1, 2}, PlotStyleGreen], dots = ListPlot[{{0, 1}, {1, 2}}, PlotStyle {PointSize[0.02], Orange}]] ;

[Graphics:HTMLFiles/3_determinants_24.gif]

Equation of a Circle through Three Points

Use a determinant to find the equation of the circle which passes through P(0,1), Q(1,2), and R(2,4).
See Lay's Case Study for chapter 3, "Determinants in Analytic Geometry."

In[17]:=

Clear[m, x, y, r, c, d] ; 

m = ({{x^2 + y^2, x, y, 1}, {1, 0, 1, 1}, {5, 1, 2, 1}, {20, 2, 4, 1}}) ; 

Det[m] 0

Out[19]=

10 + 7 x + x^2 - 11 y + y^20

Find the standard equation for this circle by "completing the squares."

In[20]:=

std = (x + 7/2)^2 + (y - 11/2)^2 - r^2//Expand

rSoln = Solve[Det[m] std, r]

Out[20]=

85/2 - r^2 + 7 x + x^2 - 11 y + y^2

Out[21]=

{{r -65/2^(1/2)}, {r65/2^(1/2)}}

In[22]:=

ans = (x + 7/2)^2 + (y - 11/2)^265/2 ;

In[23]:=

r = (65/2)^(1/2) ;

c = -7/2 ;

d = 11/2 ; 

DisplayTogether[circle = ParametricPlot[{c + r Cos[θ], d + r Sin[θ]}, {	 ... ots = ListPlot[{{0, 1}, {1, 2}, {2, 4}}, PlotStyle {PointSize[0.02], Orange}]] ;

[Graphics:HTMLFiles/3_determinants_38.gif]

Equation of a Plane through Three Points

Use a determinant to find the equation of the plane which passes through P(0,1,0), Q(1,2,1), and R(1,3,5).
See Lay's Case Study for chapter 3, "Determinants in Analytic Geometry."

In[27]:=

Clear[a, x, y, z] ; 

a = ({{x, y, z, 1}, {0, 1, 0, 1}, {1, 2, 1, 1}, {1, 3, 5, 1}}) ; 

Det[a] 0

Out[29]=

4 + 3 x - 4 y + z0

In[30]:=

Plot3D[-3x + 4y - 4, {x, -2, 2}, {y, -2, 2}, AxesLabel {x, y, z}] ;

[Graphics:HTMLFiles/3_determinants_44.gif]


Created by Mathematica  (February 19, 2005) Valid XHTML 1.1!