why the light rays refract in straight line in convex lens when the light rays come in to the optical centre of convex lens.
Look at the lens as a slab of finite thickness. In a small area around its center we may consider its opposing surfaces as parallel to each other. A ray incident on this area, at any angle, will be refracted twice at parallel interfaces. Therefore it will emerge on the other side of the lens on a direction slightly displaced, but parallel to the incident one. Since the parallel displacement is tiny as long as the lens is not too thick, it looks like the ray passes through the center undeviated.