import numpy as  np
a1 = np.array([1,2,3,4,5])
print("printing matrix a1")
print(a1)
type(a1)
print('-'*50)
a2 = np.array([[1,2,3,4,5],[9,8,7,6,5]])
a3 = np.array([[1,2,3,4,5],[9,8,7,6,5]])
print("printing matrix a2 and a3 respectively")
print(a2)
print(a3)
print('-'*50)
print("prinring the rows and columns of a3 {}".format(a3.shape))
print('-'*50)
a4 = a3.reshape(5,2)
print("priniting a3 with 5 rows and two columns")
print("a4 = \n{}".format(a4))
print("-"*50)
print("printing the product of matrix a2 and a4")
a5 = a2.dot(a4)
print(a5)
print('-'*50)
a6 = np.sin(a4)
print(a6)
print("-"*50)
print(np.cos(a4))
print("-"*50)
print("squaring the matrix a2: \n {}".format(a2**2))
print("-"*50)
print("proving sin^2(x) + cos^2(x) = 1:\n where x = \n{0} \n sin^2(x) = \n {1} \n cos^2(x) = \n {2} \n therfore {1} + {2} = 1".format(a2,(np.sin(a2))**2,(np.cos(a2))**2))
print('-'*50)
print("printing zeros matrix of 4X5:\n {}".format(np.zeros((4,5),dtype= int)))
print('-'*50)
print("printing ones matrix of 4X5:\n {}".format(np.ones((4,5),dtype= int)))
print('-'*50)
print("printing identity matrix of 4X4:\n {}".format(np.eye((4),dtype= int)))


