In this paper, the effect of pressure on various properties of brookite and rutile TiO2 has been investigated along with a phase transition study. It is seen that brookite gets transformed to rutile TiO2 at 5 GPa pressure. The bandgap of brookite and rutile TiO2 are direct in nature with values of 3.41 eV and 2.98 eV. Pressure-dependence of the Elastic compliance coefficients, elastic stiffness coefficients, bulk modulus, shear modulus, Young modulus, Poisson's ratio, B/G ratio, Vickers hardness, Lame constant has been calculated at 0, 3, 5 GPa pressures for brookite TiO2 and at 0, 5, 10, 15, and 20 GPa pressures for rutile TiO2. The shear anisotropy factors (A(100), A(010), and A(001)) along {100}, {010}, and {001} planes have been estimated at different pressure for brookite TiO2 as well as the shear anisotropic factors along {100} and {001} shear planes is estimated for rutile TiO2. Moreover, anisotropy factors (A( B )), (A( G )), and (A( U )) have been estimated at different pressure for brookite TiO2 and rutile TiO2. Furthermore, the dielectric constant is determined to investigate other optical properties for both the structures at different pressures. A pretty good agreement has been obtained between our findings and experimental data.