summaryrefslogtreecommitdiff
path: root/26/CH3
diff options
context:
space:
mode:
Diffstat (limited to '26/CH3')
-rwxr-xr-x26/CH3/EX3.1.1/3_1_1.sce6
-rwxr-xr-x26/CH3/EX3.1.13/3_1_13.sce18
-rwxr-xr-x26/CH3/EX3.1.19/3_1_19.sce14
-rwxr-xr-x26/CH3/EX3.1.37/3_1_37.sce10
-rwxr-xr-x26/CH3/EX3.1.7/3_1_7.sce6
-rwxr-xr-x26/CH3/EX3.2.13/3_2_13.sce18
-rwxr-xr-x26/CH3/EX3.2.19/3_2_19.sce25
-rwxr-xr-x26/CH3/EX3.2.25/3_2_25.sce13
-rwxr-xr-x26/CH3/EX3.2.7/3_2_7.sce15
-rwxr-xr-x26/CH3/EX3.3.1/3_3_1.sce17
-rwxr-xr-x26/CH3/EX3.3.13/3_3_13.sce28
-rwxr-xr-x26/CH3/EX3.3.19/3_3_19.sce7
12 files changed, 177 insertions, 0 deletions
diff --git a/26/CH3/EX3.1.1/3_1_1.sce b/26/CH3/EX3.1.1/3_1_1.sce
new file mode 100755
index 000000000..8d6475612
--- /dev/null
+++ b/26/CH3/EX3.1.1/3_1_1.sce
@@ -0,0 +1,6 @@
+disp('the given matrix is:')
+A=[3 0 4;2 3 2;0 5 -1]
+disp(A)
+disp('calculating det(A) using cofactor expression along first row')
+disp('det(A)=3 X (-1 X 3-5 X 2)+4 X (2 X 5-3 X 0)')
+disp(det(A),'=') \ No newline at end of file
diff --git a/26/CH3/EX3.1.13/3_1_13.sce b/26/CH3/EX3.1.13/3_1_13.sce
new file mode 100755
index 000000000..13e9d1d84
--- /dev/null
+++ b/26/CH3/EX3.1.13/3_1_13.sce
@@ -0,0 +1,18 @@
+disp('the given matrix is:')
+A=[4 0 -7 3 -5;0 0 2 0 0;7 3 -6 4 -8;5 0 5 2 -3;0 0 9 -1 2]
+disp(A,'A=')
+P=A
+disp('since row 2 has maximum zeros, using row 2 for cofactor expression')
+A(2,:)=[]
+A(:,3)=[]
+disp('deleting second row and third column from A, we get')
+disp(A)
+disp(A,'det','det(A)=-2 X')
+disp('for the 4X4 matrix obtained, using column 2 for cofactor exansion')
+disp('deleting second column and row from the 4X4 matrix')
+A(2,:)=[]
+A(:,2)=[]
+disp(A)
+disp(A,'det','det(A)=-2 X 3 X')
+disp('-6 X [4 X (4-3)-5 X (6-5)]','=')
+disp(-6*det(A),'=') \ No newline at end of file
diff --git a/26/CH3/EX3.1.19/3_1_19.sce b/26/CH3/EX3.1.19/3_1_19.sce
new file mode 100755
index 000000000..452a8e568
--- /dev/null
+++ b/26/CH3/EX3.1.19/3_1_19.sce
@@ -0,0 +1,14 @@
+disp('the given matrix is:')
+disp('A=')
+disp('a b')
+disp('c d')
+disp('det(A)=ad-bc')
+disp('interchanging the rows of A, we get')
+disp('B=')
+disp('c d')
+disp('a b')
+disp('det(B)=bc-ad')
+disp('-(ad-bc)','=')
+disp('-det(A)','=')
+disp('interchanging 2 rows reverses the sign of the determinant')
+disp('at least for the 2X2 case') \ No newline at end of file
diff --git a/26/CH3/EX3.1.37/3_1_37.sce b/26/CH3/EX3.1.37/3_1_37.sce
new file mode 100755
index 000000000..a101d43ef
--- /dev/null
+++ b/26/CH3/EX3.1.37/3_1_37.sce
@@ -0,0 +1,10 @@
+A=[3 1;4 2]
+disp('the given matrix is:')
+disp(A)
+disp(det(A),'det(A)=')
+disp('5 X A = ')
+disp(5*A)
+disp(det(5*A),'det(5*A)=')
+disp('thus, det(5A) is not equal to 5Xdet(A)')
+disp('infact, the relation between det(rA) and det(A) for a nxn matrix is:')
+disp('det(rA)=(r^n)*det(A)') \ No newline at end of file
diff --git a/26/CH3/EX3.1.7/3_1_7.sce b/26/CH3/EX3.1.7/3_1_7.sce
new file mode 100755
index 000000000..d33844f04
--- /dev/null
+++ b/26/CH3/EX3.1.7/3_1_7.sce
@@ -0,0 +1,6 @@
+disp('given matrix is:')
+A=[4 3 0;6 5 2;9 7 3]
+disp(A)
+disp('calculating det(A) using cofactor expression along first row')
+disp('det(A)=4 X (5 X 3-7 X 2)-3 X (6 X 3-9 X 2)')
+disp(det(A),'=') \ No newline at end of file
diff --git a/26/CH3/EX3.2.13/3_2_13.sce b/26/CH3/EX3.2.13/3_2_13.sce
new file mode 100755
index 000000000..e879e9b4a
--- /dev/null
+++ b/26/CH3/EX3.2.13/3_2_13.sce
@@ -0,0 +1,18 @@
+disp('the given matrix is:')
+a=[2 5 4 1;4 7 6 2;6 -2 -4 0;-6 7 7 0]
+disp(a,'A=')
+disp('performing row operations')
+a(2,:)=a(2,:)-2*a(1,:)
+disp(a)
+disp('using cofactor expansion about fourth column')
+a(1,:)=[]
+a(:,4)=[]
+disp(a,'det','det(A)= -1 X')
+disp('performing row operations')
+a(3,:)=a(3,:)+a(2,:)
+disp(a)
+disp('using cofactor expansion about first column')
+a(2,:)=[]
+a(:,1)=[]
+disp(a,'det','det(A)= -1 X -6 X')
+disp(6*det(a),'=') \ No newline at end of file
diff --git a/26/CH3/EX3.2.19/3_2_19.sce b/26/CH3/EX3.2.19/3_2_19.sce
new file mode 100755
index 000000000..60a8c6579
--- /dev/null
+++ b/26/CH3/EX3.2.19/3_2_19.sce
@@ -0,0 +1,25 @@
+disp('the given matrix is:')
+disp('A=')
+disp(' a b c')
+disp('2d+a 2e+b 2f+c')
+disp(' g h i')
+disp('B=')
+disp('a b c')
+disp('d e f')
+disp('g h i')
+disp('given, det(B)=7')
+disp('performing row operations on A')
+disp('R2=R2-R1')
+disp('A=')
+disp('a b c')
+disp('2d 2e 2f')
+disp('g h i')
+disp('factoring 2 out of row 2')
+disp('A=')
+disp('2 X')
+disp('a b c')
+disp('d e f')
+disp('g h i')
+disp('therefore, det(A)=2 X det(B)')
+disp('=2 X 7')
+disp('= 14') \ No newline at end of file
diff --git a/26/CH3/EX3.2.25/3_2_25.sce b/26/CH3/EX3.2.25/3_2_25.sce
new file mode 100755
index 000000000..ef1cc6356
--- /dev/null
+++ b/26/CH3/EX3.2.25/3_2_25.sce
@@ -0,0 +1,13 @@
+disp('the given vectors are:')
+v1=[7 -4 -6]'
+v2=[-8 5 7]'
+v3=[7 0 -5]'
+disp(v3,'v3=',v2,'v2=',v1,'v1=')
+disp('combining them as a matrix')
+a=[v1 v2 v3]
+disp(a,'A=')
+disp('if det(A) is not equal to zero, then v1 v2 and v3 are linearly independent')
+disp('expanding about third column')
+disp('det(A)=7 X (-28+30) - 5 X (35-32)')
+disp(det(a),'=')
+disp('hence, v1 v2 and v3 are linearly independent') \ No newline at end of file
diff --git a/26/CH3/EX3.2.7/3_2_7.sce b/26/CH3/EX3.2.7/3_2_7.sce
new file mode 100755
index 000000000..08150668d
--- /dev/null
+++ b/26/CH3/EX3.2.7/3_2_7.sce
@@ -0,0 +1,15 @@
+disp('the given matrix is:')
+A=[1 3 0 2;-2 -5 7 4;3 5 2 1;1 -1 2 -3]
+disp(A,'A=')
+disp('performing row operations')
+A(2,:)=A(2,:)-(A(2,1)/A(1,1))*A(1,:)
+A(3,:)=A(3,:)-(A(3,1)/A(1,1))*A(1,:)
+A(4,:)=A(4,:)-(A(4,1)/A(1,1))*A(1,:)
+disp(A)
+A(3,:)=A(3,:)-(A(3,2)/A(2,2))*A(2,:)
+A(4,:)=A(4,:)-(A(4,2)/A(2,2))*A(2,:)
+disp(A)
+A(4,:)=A(4,:)-(A(4,3)/A(3,3))*A(3,:)
+disp(A)
+disp('det(A) is the product of diagonal entries')
+disp(det(A),'det(A)=') \ No newline at end of file
diff --git a/26/CH3/EX3.3.1/3_3_1.sce b/26/CH3/EX3.3.1/3_3_1.sce
new file mode 100755
index 000000000..70180971b
--- /dev/null
+++ b/26/CH3/EX3.3.1/3_3_1.sce
@@ -0,0 +1,17 @@
+disp('the co-efficient matrix is:')
+a=[5 7;2 4]
+disp(a,'A=')
+disp('the RHS is:')
+b=[3;1]
+disp(b)
+disp('applying cramers rule')
+disp('replacing first column of matrix A by b')
+A1=[3 7;1 4]
+disp(A1,'A1=')
+disp('replacing second column of matrix A by b')
+A2=[5 3;2 1]
+disp(A2,'A2=')
+disp('x1=det(A1)/det(A)')
+disp((det(A1)/det(a)),'=')
+disp('x2=det(A2)/det(A)')
+disp((det(A2)/det(a)),'=') \ No newline at end of file
diff --git a/26/CH3/EX3.3.13/3_3_13.sce b/26/CH3/EX3.3.13/3_3_13.sce
new file mode 100755
index 000000000..56c60ca2b
--- /dev/null
+++ b/26/CH3/EX3.3.13/3_3_13.sce
@@ -0,0 +1,28 @@
+disp('the given matrix is:')
+a=[3 5 4;1 0 1;2 1 1]
+disp(a,'A=')
+disp('the cofactors are:')
+C11=det([0 1;1 1])
+disp(C11,'C11=')
+C12=-det([1 1;2 1])
+disp(C12,'C12=')
+C13=det([1 0;2 1])
+disp(C13,'C13=')
+C21=-det([5 4;1 1])
+disp(C21,'C21=')
+C22=det([3 4;2 1])
+disp(C22,'C22=')
+C23=-det([3 5;2 1])
+disp(C23,'C23=')
+C31=det([5 4;0 1])
+disp(C31,'C31=')
+C32=-det([3 4;1 1])
+disp(C32,'C32=')
+C33=det([3 5;1 0])
+disp(C33,'C33=')
+B=[C11 C12 C13;C21 C22 C23;C31 C32 C33]'
+disp('adj(A)=')
+disp(B)
+C=B/(det(a))
+disp('inv(A)=')
+disp(C) \ No newline at end of file
diff --git a/26/CH3/EX3.3.19/3_3_19.sce b/26/CH3/EX3.3.19/3_3_19.sce
new file mode 100755
index 000000000..068e15ed6
--- /dev/null
+++ b/26/CH3/EX3.3.19/3_3_19.sce
@@ -0,0 +1,7 @@
+disp('the points forming the parrallelogram are')
+disp('(0,0),(5,2),(6,4),(11,6)')
+disp('using the vertices adjacent to origin to form a matrix')
+A=[5 6;2 4]
+disp(A,'A=')
+disp('Area of parallelogram = det(A)')
+disp(det(A),'=') \ No newline at end of file