b = matrix([[1],[1],[1]])
a = matrix([[1],[2],[2]])
t=a.transpose()
x1=t*b
x2=t*a
x=x1[0]/x2[0]
P=x*a 
print 'Projection matrix P is'
print P