Skip to content

Reducing augmented matrices

2 messages · jshort, Charles C. Berry

#
Hi

How does one tell R that one is using an augmented matrix as appose to an
non-augmented matrix? 

For instance, when I want to solve two equations in two unknowns, I will
have to solve a 2 by 3 augmented matrix, however all I know to type into R
is something like this;

weights = c(1,2,3,4,5,6) (say)

M1=matrix(weights,ncol=3).

Does R correctly interpret me when I write the above code?

Furthermore, how do I reduce this augmented matrix in R such that it will
give me my two unknown variables?

Thanks so much.
#
On Tue, 19 Jan 2010, jshort wrote:

            
Explicitly creating an augmented matrix is unnecessary and 
awkward if the object is to solve a system of linear equations.

See:

 	?solve

HTH,

Chuck
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901