MAE vs MSE for Linear regression Several articles says that MAE is robust to outliers but MSE is not and MSE can hamper the model if errors are too huge. My question is that MSE and MAE both are error matrices, our priority is to just minimise the error whether we use MSE or MAE. Where does outliers come into play while using error matrices?
What difference can an error matrix make in linear regression for choosing optimal values of the parameters (in regards to outliers because as per my knowledge error matrices doesn't contribute for choosing parameters, its the loss function we are minimising) which we are trying to learn ($y=mx+c$ : parameters being $m$ and $c$)?
But if they are not helping with parameters then why are we worried about outliers while choosing error matrixes?

Since the error is defined $\hat{u}=y-\hat{y}$ (difference between actual and predicted value), taking the squared error will give a high weight to outliers (with "large" difference between $y-\hat{y}$). This will also affect the mean error.
Using the absolute difference between $y-\hat{y}$ will give outliers a lower weight compared to the case of taking squares.
Suppose $y=10$, $\hat{y}=110$, and $\hat{u}=-100$. We want to get rid of the negative sign, so we take squares or use the absolute value:
$\hat{u}^2=10,000$
$|\hat{u}|=100$
Suppose $y=10$, $\hat{y}=11$, and $\hat{u}=-1$. We want to get rid of the negative sign, so we take squares or use the absolute value:
$\hat{u}^2=1$
$|\hat{u}|=1$
MAE and MSE are simply different ways of weighting the errors. There are also alternatives, such as the Huber loss, which combines MSE and MAE by using MSE logic for "small" residual values and MAE logic for "large" residual values (which might have a huge impact).

Image taken from Little Bobby Tables's answer to this post on Stack Overflow.
