D=diagm(1:5);
(D,D')
issym(D)
S=[3 12;12 5]
round(inv(S),7)
R=rand(5,2); round(R*R',3)
issym(R*R')
a=R'*R
Fact without proof: if S is symmetric, elimination produces S=LDL'
A=randn(5,5);
(L,U,P)=lu(A);
(round(L,3),round(U,3),round(P,1))
(round(P*A,3),round(L*U,3))
v=rand(0:9, 5); w=rand(0:9,5); [v w]
v*10
v+w
A=rand(0:9,2,2); B=rand(0:9,2,2); (A,B)
A*10
A+B
typeof(sin)
sin+cos
+(f::Function,g::Function)=x->f(x)+g(x);
(sin+cos)(12)
sin(12)+cos(12)
*(c::Number,f::Function) = x->c*f(x);
(10*sin)(5)
10*sin(5)
x=-10:.001:10; plot(x, (sin+cos)(x));
plot( x, (10cos)(x));
Subspaces: Are sums in the space? Are constant times vector in the space?