# How can you guarantee that an element shape function is 1 or 0?

Sadiku (2000), in developing the finite element method (using triangular elements as an example), defines a class of functions called element shape functions $\alpha_i(x,y)$, and claims that they are equal to $1$ when $i = j$, and $0$ otherwise:

I don't follow the reasoning. To me, the shape function doesn't depend on two parameters here to compare (e.g., $\alpha_{ij}$). In the first place, there's only $\{i, x, y\}$ to vary.

What does Sadiku mean by this?

This is just the so-called barycentric coordinates of a point (x,y) with respect to the triangle defined by $V_{e1}$, $V_{e2}$ and $V_{e3}$. $\alpha_i=1$ when $i=j$ and 0 otherwise means that the shape function $\alpha_1$ has value 1 at $V_{e1}$ and value 0 at $V_{e2}$ and $V_{e3}$. Similarly, $\alpha_2$ has value 1 at $V_{e2}$ and value 0 at $V_{e3}$ and $V_{e1}$ and $\alpha_3$ has value 1 at $V_{e3}$ and value 0 at $V_{e1}$ and $V_{e2}$.

• I just wrote out $\alpha_1(x_1,y_1)$ and $\alpha_1(x_2,y_2)$, but I don't see how either of them simplify to 1 or 0. Would you mind illustrating your claim a little bit? – bright-star Jan 18 '17 at 18:00
• Plugging ($x_1$,$y_1$) into equation (6.8a) and the numerator will become $(x_2y_3-x_3y_2)+(y_2-y_3)x_1+(x_3-x_2)y_1$, which equals two times the triangle area A and therefore $\alpha_1(x_1,y_1)=1$. The computation for finding $\alpha_1(x_2,y_2)=0$ should be straight forward. – fang Jan 19 '17 at 5:57

With the reassurance that the properties claimed by Sadiku are indeed an intrinsic feature of barycentric coordinates as @fang explains, working out the algebra indeed leads to the right result. An abbreviated set of examples follows.

Off-point case:

$$\alpha_1(x_2,y_2) = \frac{1}{2A} \left[ (x_2 y_3 - x_3 y_2) + (y_2 x_2 - y_3 x_2) + (x_3 y_2 - x_2 y_2) \right] \\ \implies \alpha_1(x_2, y_2) = \frac{1}{2A}(0)$$

On-point case:

$$\alpha_1(x_1,y_1) = \frac{1}{2A} = \left[ (x_2 y_3 - x_3 y_2) + (y_2 x_1 - y_3 x_1) + (x_3 y_1 - x_2 y_1) \right]$$

Note that

$$2A = x_2 y_3 - x_2 y_1 - x_1 y_3 - x_3 y_2 + x_3 y_1 + x_1 y_2$$

So

$$\alpha_1(x_1,y_1) = \frac{x_2 y_3 - x_3 y_2 + y_2 x_1 - y_3 x_1 + x_3 y_1 - x_2 y_1}{x_2 y_3 - x_2 y_1 - x_1 y_3 - x_3 y_2 + x_3 y_1 + x_1 y_2} \\ = 1$$