A hat function in 2D Cartesian is defined as
$$f(x)= \begin{cases} x, & x\geq 0\\ -x, & x<0 \end{cases}$$
Could any one help me how the hat function is defined in 3D Cartesian.
Note, I have a feeling the answer could be a pyramid.
A hat function in 2D Cartesian is defined as
$$f(x)= \begin{cases} x, & x\geq 0\\ -x, & x<0 \end{cases}$$
Could any one help me how the hat function is defined in 3D Cartesian.
Note, I have a feeling the answer could be a pyramid.
For a real number $x$ you have the absolute value $|x|$ as defined by you. The geometric meaning of $|x|$ is the distance of $x$ to the origin.
In higher dimension, there are far more possibilities to define the distance of a point to the origin. For example, for all $p\in[1,\infty]$ there is the $p$-norm $\|~\cdot~\|_p$ defined for a vector $x=(x_1,\ldots,x_n)$ by $$ \|x\|_p=\begin{cases} \sum_{k=1}^n|x_k| & p=1\\ \left(\sum_{k=1}^n|x_k|^p\right)^{\frac1p} & p\in(1,\infty)\\ \max\{|x_1|,\ldots,|x_n|\} & p=\infty \end{cases}. $$ The shade of the function $f_p:\mathbb R^n\to \mathbb R$, defined by $f_p(x)=\|x\|_p$ depends on $p$.
If you are interested in the classical hat function, then I have to agree with the comments. Normally you consider $$ f(x)=\max\{0,1-|x|\}. $$ Using this, you can also get different hat functions for higher dimension by $$ f_p(x)=\max\{0,1-\|x\|_p\}. $$ The form depends again on $p$. For $p=1$ and $p=\infty$, you get pyramids while $p=2$ has a circle as its support.