the factor of safety
No engineer trusts a material to be exactly as strong as the textbook says, or a load to be exactly what was predicted. The factor of safety is the deliberate cushion between the two: you design a part to run at a stress well BELOW the level where it would fail, leaving margin for everything you cannot know for sure. It is the engineering answer to an honest fact — real properties scatter, and real service is messier than any calculation.
It is defined as the factor of safety N = (strength the material can bear) / (stress you actually design it to carry). Turned around, the safe working stress, also called the design stress, is sigma_work = (yield strength) / N. Example: a steel with a yield strength of 300 MPa designed with N = 2 is only loaded to 300 / 2 = 150 MPa in service, keeping a two-to-one margin against yielding. Typical factors run from about 1.5 where loads and materials are well known and weight is precious (aircraft), up to 4 or more where loads are uncertain, failure is catastrophic, or lives are at stake (buildings, cranes, pressure vessels).
Choosing N is really about honesty over the unknowns: scatter in material strength, uncertainty in the loads, corrosion and wear over years, temperature, manufacturing flaws, and how deadly a failure would be. A bigger N is safer but heavier and costlier, so the factor is a judgement, not a magic number. It is a cushion, not a licence — designing to yield with N = 2 does not mean a part can safely be loaded to twice its design stress, because the margin is being spent on the very uncertainties you cannot see.
An elevator cable able to hold 20000 N is used to lift loads up to 4000 N, giving a factor of safety of 20000 / 4000 = 5 — deliberately generous because a failure could be fatal and the true worst-case load is hard to know.
Working stress = strength / factor of safety; the factor absorbs scatter, uncertainty, and consequences.
A safety factor is a margin against uncertainty, not spare capacity to be used up. Designing with N = 2 does not license loading the part to twice its design stress — that margin is already committed to scatter, corrosion, and the loads you failed to foresee.