Linearity
Linearity- A system is linear if a constant that multiplies an input to a system is also present in the output. Adding any number of linear combinations of complex numbers and functions of time together does not affect the linearity of the system.
A*x1(t) + B*x2(t) => A*y1(t) + B*y2(t) .... extendable for any amount of complex numbers (A, B, C...) and functions (x1, x2, x3...)
Linear System: y[n] = 4 * x[n] Let x1[n] = $ 2n $ x2[n] = $ n^2 $ x1[n] + x2[n] = xtot[n] = $ 2n + n^2 $ ====> ytot[n] = 4* xtot[n] = $ 8n + 4n^2 $ x1[n] => y1[n] = 8n x2[n] => y2[n] = $ 4n^2 $ ====> ytot = y1[n] + y2[n] = $ 8n + 4n^2 $ $ 8n + 4n^2 $ = $ 8n + 4n^2 $ Since the output of the two is the same, the system is linear.
Nonlinear System: y[n] = x[n]$ ^2 $ Let x1[n] = $ 2n $ x2[n] = $ n^2 $
x1[n] + x2[n] = xtot[n] = $ 2n + n^2 $ ====> ytot[n] = xtot[n]$ ^2 $ = $ 4n^2 + 4n^3 + n^4 $ x1[n] => y1[n] = 4n^2 x2[n] => y2[n] = $ n^4 $ ====> ytot = y1[n] + y2[n] = $ 4n^2 + n^4 $ $ 4n^2 + 4n^3 + n^4 $ != $ 4n^2 + n^4 $
Since the output of the two is not the same, the system is nonlinear.