Temporary variables store intermediate results to prevent input and output vectors from being the same during function calls.