Why is the focal length of a convex mirror negative? According to the Cartesian sign convention, the focal length should be positive since the convex mirror forms a virtual image to the right of mirror (positive direction) when light comes from left.
My teacher also said that it would be positive but I have read in many places on the internet that it is negative. How?
 A: Every time you look up "the" spherical mirror formula, it comes with a set of "where's".  These define what each symbol stands for, and the sign convention to use to distinguish the location of objects and images and the difference between concave and convex radii.  
You can find different-looking spherical mirror formulas, with (naturally) different sets of "where's".  These can each be applied to a specific problem and give a different-looking answer, which is interpreted by the "where's" to give the same result.
You can get in a lot of trouble by combining one version of the formula with a some other version of "where's"... 
A: The general and easy rule to remember the sign convention for convex and concave mirrors and lenses or any optical component is thinking in terms of power.
The power of an optical element is calculated by 1/focal length and the unit is dioptre (1/m). It is negative for components which diverge parallel incident rays of light and positive for components which converge parallel incident rays of light.
Accordingly convex lenses and concave mirrors have positive power (focal length) and concave lenses and convex mirrors have negative power.
Please have a look at the wikipedia article for more information.
