In statistics, a residual is the difference between an observed value and a predicted value in regression analysis. It is calculated as the observed value minus the predicted value. The residual is a measure of how well a line fits an individual data point. If the residual is positive, it means that the predicted value was too low, and if it is negative, it means that the predicted value was too high. The aim of a regression line is to minimize the sum of residuals. Residuals are used to assess model fit, identify outliers, and check for patterns in the data. In numerical analysis, a residual is the error in a result). It is the difference between the right-hand side of an equation and the approximation of its solution). The residual can be used to measure the deviation of the approximation from the exact solution). Residuals appear in many areas of mathematics, including iterative solvers such as the generalized minimal residual method).