diff options
author | prashantsinalkar | 2019-10-04 12:24:07 +0530 |
---|---|---|
committer | prashantsinalkar | 2019-10-04 12:24:07 +0530 |
commit | b3f3a8ecd454359a2e992161844f2fb599f8238a (patch) | |
tree | 7bb3f64824627ef179d5f341266a664fd0b69011 /Linear_Algebra_by_Jim_Hefferon/CH1/EX3.3 | |
parent | 80492d3788738910b80dc16f918511057b7321d6 (diff) | |
download | R_TBC_Uploads-b3f3a8ecd454359a2e992161844f2fb599f8238a.tar.gz R_TBC_Uploads-b3f3a8ecd454359a2e992161844f2fb599f8238a.tar.bz2 R_TBC_Uploads-b3f3a8ecd454359a2e992161844f2fb599f8238a.zip |
Initial commit/added all books
Diffstat (limited to 'Linear_Algebra_by_Jim_Hefferon/CH1/EX3.3')
-rw-r--r-- | Linear_Algebra_by_Jim_Hefferon/CH1/EX3.3/Ex1_3_3.R | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Linear_Algebra_by_Jim_Hefferon/CH1/EX3.3/Ex1_3_3.R b/Linear_Algebra_by_Jim_Hefferon/CH1/EX3.3/Ex1_3_3.R new file mode 100644 index 00000000..a8612292 --- /dev/null +++ b/Linear_Algebra_by_Jim_Hefferon/CH1/EX3.3/Ex1_3_3.R @@ -0,0 +1,24 @@ +#Example 3.3,section 1.3,chapter 1,page 24
+#package used matlib v0.9.1
+#install package using command: install.packages("matlib")
+#Github reposiory of matlib :https://github.com/friendly/matlib
+
+#installation and loading library
+#install.packages("matlib")
+library("matlib")
+
+#program
+A <- matrix(c(3,2,4,-1),ncol = 2)
+b <- c(3,1)
+c <- c(0,0)
+Ab <- cbind(A,b) # linear system
+Ac <- cbind(A,c) #system of homogeneous equations
+#reduction of original system
+Ab <- rowadd(Ab,1,2,-2/3)
+#reduction of homogeneous system
+Ac <- rowadd(Ac,1,2,-2/3)
+#comparing both
+Ab
+Ac
+#Obviously the two reductions go in the same way.
+#We can study how to reduce a linear systems by instead studying how to reduce the associated homogeneous system.
\ No newline at end of file |