save_plots = F if( save_plots ){ postscript("../WriteUp/Graphics/1980/prob_22.eps", onefile=FALSE, horizontal=FALSE) } x = seq( -1, +2, length.out=100 ) y_1 = 4*x + 1 y_2 = x + 2 y_3 = -2*x+4 y_min = min( c( y_1, y_2, y_3 ) ) y_max = max( c( y_1, y_2, y_3 ) ) plot(x, y_1, type='l', xlab='x', ylab='y', ylim=c(y_min, y_max), col='green' ) points(x, y_2, type='l', col='blue') points(x, y_3, type='l', col='red') grid() legend('top', legend=c('4x+1', 'x+2', '-2x+4'), col=c('green', 'blue', 'red'), lty=1) if( save_plots ){ dev.off() } A = matrix( c(-1, 1, 2, 1), nrow=2, ncol=2, byrow=TRUE ) solve(A, c(2, 4))