From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 3293/CH3/EX3.24/Ex3_24.sce | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 3293/CH3/EX3.24/Ex3_24.sce (limited to '3293/CH3/EX3.24/Ex3_24.sce') diff --git a/3293/CH3/EX3.24/Ex3_24.sce b/3293/CH3/EX3.24/Ex3_24.sce new file mode 100755 index 000000000..4e486903f --- /dev/null +++ b/3293/CH3/EX3.24/Ex3_24.sce @@ -0,0 +1,47 @@ +//page 104 +//Example 3.24 +clc; +clear; +close; +disp('W be the subspace of R^5 spanned by vectors:'); +a1 = [2 -2 3 4 -1]; +a2 = [-1 1 2 5 2]; +a3 = [0 0 -1 -2 3]; +a4 = [1 -1 2 3 0]; +disp(a1,'a1 = '); +disp(a2,'a2 = '); +disp(a3,'a3 = '); +disp(a4,'a4 = '); +disp('Matrix A by the row vectors a1,a2,a3,a4 will be:'); +A = [a1;a2;a3;a4]; +disp(A,'A = '); +disp('After Applying row transformations, we get the row reduced echelon matrix R of A;'); +T = A; //Temporary matrix to store A +//R1 = R1 - R4 and R2 = R2 + R4 +A(1,:) = A(1,:) - A(4,:); +A(2,:) = A(2,:) + A(4,:); +//R2 = R2/2 +A(2,:) = 1/2 * A(2,:); +//R3 = R3 + R2 and R4 = R4 - R1 +A(3,:) = A(3,:) + A(2,:); +A(4,:) = A(4,:) - A(1,:); +//R3 = R3 - R4 +A(3,:) = A(3,:) - A(4,:); +//R3 = R3/3 +A(3,:) = 1/3 * A(3,:); +//R2 = R2 - R3 +A(2,:) = A(2,:) - A(3,:); +//R2 = R2/2 and R4 = R4 - R2 - R3 +A(2,:) = 1/2 * A(2,:); +A(4,:) = A(4,:) - A(2,:) - A(3,:); +//R1 = R1 - R2 + R3 +A(1,:) = A(1,:) - A(2,:) + A(3,:); +R = A; +A = T; +disp(R,'R = '); +disp('Then we obtain all the linear functionals f by assigning arbitrary values to c2 and c4'); +disp('Let c2 = a, c4 = b then c1 = a+b, c3 = -2b, c5 = 0.'); +disp('So, W0 consists all linear functionals f of the form'); +disp('f(x1,x2,x3,x4,x5) = (a+b)x1 + ax2 -2bx3 + bx4'); +disp('Dimension of W0 = 2 and basis {f1,f2} can be found by first taking a = 1, b = 0. Then a = 0,b = 1'); +//end -- cgit