% Lecture17.m

% This file implements a code for teaching Math 211 lecture 17
% about determinants.

syms a b c d a11 a12 a13 a21 a22 a23 a31 a32 a33;

'The determinant'
pause

'Two by two case'
pause
A=[a,b;c,d]
pause

A(2,:)=A(2,:)+ (-b/a)A(1,:);
A
pause

z=A(1,1)*A(2,2)
pause

simple(z)
pause 

det(A)
pause

B=[a11 a12 a13; a21 a22 a23; a31 a32 a33]
pause

B(2,:)=B(2,:)+ (-a21/a11)B(1,:);
B
pause

B(3,:)=B(2,:)+ (-a31/a11)B(1,:);
B
pause

B(3,:)=B(3,:)+(-B(3,2)/B(2,2))B(2,:);
B
pause

w=B(1,1)*B(2,2)*B(3,3)
pause

simple(w)
pause

det(B)
