# Teaching Algebra using R

Calculating the intercept and the slope

<I will put the program example here later>

How to draw a line in X-Y graph

x=c(-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
y=-2*x+3
y
plot(x,y)

Calculating the distance between two points (Euclidian distance)

2. Replicate it with R

x1=5
y1=2
x2=-3
y2=-4
d=sqrt( (x1-x2)^2 + (y1-y2)^2 )
d

Caluculating the distance between two points on the globe

http://www.movable-type.co.uk/scripts/latlong.html

Reference:

### R and Linear Algebra

http://blog.revolutionanalytics.com/2013/08/r-and-linear-algebra.html

Matrix

http://www.inside-r.org/r-doc/Matrix/Matrix

3D mattping

http://technology.cpm.org/general/3dgraph/

Proving Pythagoras' formula (in Japanese)

http://www004.upp.so-net.ne.jp/s_honma/pythagoras/pythagoras3.htm

Basic arithmetic training (Japanese)

http://dailywork.net/modules/100masu/

Fractals by R