how to represent a function as a matrix I read somewhere that functions can be represented in many ways including sets and Venn diagram, sets or matrices but there was no example for the matrix type. I guess it might be in the same way we show equation systems in matrices but I'm not sure. please show me how is that done.
 A: I'm pretty sure you're referring to something called a 'Linear Map' between the Vector Space of Polynomials ($\mathbb{F}[x]_{n}$).
A linear map is a special kind of function, that instead of taking one number and outputting one number, like $f(x)=x^{2} + x + 5$, it takes in a whole polynomial, and outputs another polynomial: $$f(ax^{2} + bx + c) = (a+b)x^{2} - (b+c)x + (a+c)$$
For example, $$f(2x^{2} - x + 5) = (2-1)x^{2} - (-1 + 5)x + (2 + 5) \\ = x^{2} - 4x + 7$$
Now, instead of writing the input as that whole polynomial ($ax^{2} + bx + c$), we give it a vector of three numbers, $[a, b, c]$, where $a$ represents the first coefficient of $x^{2}$, $b$ is the coefficient of $x$, and $c$ is the intercept.
This means if I gave you $[1, 2, 3]$, the polynomial I'm talking about is $(1)x^{2} + (2)x + (3)1$.
This means that if $[a,b,c]$ is the input of our example polynomial from above, then $[a+b, b+c, a+c]$ is the output.
I'm not sure how much you know about matrixes, but try to find a matrix that can turn that input vector into that output vector.
The answer is...
$$\begin{bmatrix}1 & 0 & 1 \\ 1 & 1 & 0 \\ 0 & 1 & 1\end{bmatrix}\\$$
You can test this by taking some random polynomial, say $f(2x^{2} - 4x + 1)$ and it's corresponding vector $[2, -4, 1]$, and checking if the output of the function is the same as the output of the matrix.
These are all big topics in Linear Algebra. I recommend you check out this brand new intro to Linear Algebra by MIT, the lecturer is very famous in Math circles.
As always, Khan Academy has a pretty good course too.
