Definitions The most common definition is as a piecewise function:
tri  ( x ) = Λ ( x )   = def   max ( 1 − | x | , 0 ) = { 1 − | x | , | x | < 1 ; 0 otherwise . {\displaystyle {\begin{aligned}\operatorname {tri} (x)=\Lambda (x)\ &{\overset {\underset {\text{def}}{}}{=}}\ \max {\big (}1-|x|,0{\big )}\\&={\begin{cases}1-|x|,&|x|<1;\\0&{\text{otherwise}}.\\\end{cases}}\end{aligned}}} Equivalently, it may be defined as the convolution  of two identical unit rectangular functions :
tri  ( x ) = rect  ( x ) ∗ rect  ( x ) = ∫ − ∞ ∞ rect  ( x − τ ) ⋅ rect  ( τ ) d τ . {\displaystyle {\begin{aligned}\operatorname {tri} (x)&=\operatorname {rect} (x)*\operatorname {rect} (x)\\&=\int _{-\infty }^{\infty }\operatorname {rect} (x-\tau )\cdot \operatorname {rect} (\tau )\,d\tau .\\\end{aligned}}} The triangular function can also be represented as the product of the rectangular and absolute value  functions:
tri  ( x ) = rect  ( x / 2 ) ( 1 − | x | ) . {\displaystyle \operatorname {tri} (x)=\operatorname {rect} (x/2){\big (}1-|x|{\big )}.}  Alternative triangle function  Note that some authors instead define the triangle function to have a base of width 1 instead of width 2:
tri  ( 2 x ) = Λ ( 2 x )   = def   max ( 1 − 2 | x | , 0 ) = { 1 − 2 | x | , | x | < 1 2 ; 0 otherwise . {\displaystyle {\begin{aligned}\operatorname {tri} (2x)=\Lambda (2x)\ &{\overset {\underset {\text{def}}{}}{=}}\ \max {\big (}1-2|x|,0{\big )}\\&={\begin{cases}1-2|x|,&|x|<{\tfrac {1}{2}};\\0&{\text{otherwise}}.\\\end{cases}}\end{aligned}}} In its most general form a triangular function is any linear B-spline : [ 1]  
tri j  ( x ) = { ( x − x j − 1 ) / ( x j − x j − 1 ) , x j − 1 ≤ x < x j ; ( x j + 1 − x ) / ( x j + 1 − x j ) , x j ≤ x < x j + 1 ; 0 otherwise . {\displaystyle \operatorname {tri} _{j}(x)={\begin{cases}(x-x_{j-1})/(x_{j}-x_{j-1}),&x_{j-1}\leq x<x_{j};\\(x_{j+1}-x)/(x_{j+1}-x_{j}),&x_{j}\leq x<x_{j+1};\\0&{\text{otherwise}}.\end{cases}}} Whereas the definition at the top is a special case
Λ ( x ) = tri j  ( x ) , {\displaystyle \Lambda (x)=\operatorname {tri} _{j}(x),} where x j − 1 = − 1 {\displaystyle x_{j-1}=-1} x j = 0 {\displaystyle x_{j}=0} x j + 1 = 1 {\displaystyle x_{j+1}=1} 
A linear B-spline is the same as a continuous piecewise linear function  f ( x ) {\displaystyle f(x)} f ( x ) {\displaystyle f(x)} 
f ( x ) = ∑ j y j ⋅ tri j  ( x ) , {\displaystyle f(x)=\sum _{j}y_{j}\cdot \operatorname {tri} _{j}(x),} where x j < x j + 1 {\displaystyle x_{j}<x_{j+1}} j {\displaystyle j} ordered pair  ( x j , y j ) {\displaystyle (x_{j},y_{j})} 
f ( x j ) = y j {\displaystyle f(x_{j})=y_{j}} The transform is easily determined using the convolution property of Fourier transforms  and the Fourier transform of the rectangular function :
F { tri  ( t ) } = F { rect  ( t ) ∗ rect  ( t ) } = F { rect  ( t ) } ⋅ F { rect  ( t ) } = F { rect  ( t ) } 2 = s i n c 2 ( f ) , {\displaystyle {\begin{aligned}{\mathcal {F}}\{\operatorname {tri} (t)\}&={\mathcal {F}}\{\operatorname {rect} (t)*\operatorname {rect} (t)\}\\&={\mathcal {F}}\{\operatorname {rect} (t)\}\cdot {\mathcal {F}}\{\operatorname {rect} (t)\}\\&={\mathcal {F}}\{\operatorname {rect} (t)\}^{2}\\&=\mathrm {sinc} ^{2}(f),\end{aligned}}} where sinc  ( x ) = sin  ( π x ) / ( π x ) {\displaystyle \operatorname {sinc} (x)=\sin(\pi x)/(\pi x)} normalized sinc function .
For the general form, we have:
F { tri  ( t a ) } = F { 1 a rect  ( t a ) ∗ 1 a rect  ( t a ) } = 1 a   F { rect  ( t a ) } ⋅ F { rect  ( t a ) } = 1 a   F { rect  ( t a ) } 2 = 1 a   a 2   s i n c 2 ( a ⋅ f ) = a   s i n c 2 ( a ⋅ f ) . {\displaystyle {\begin{aligned}{\mathcal {F}}\{\operatorname {tri} \left({\tfrac {t}{a}}\right)\}&={\mathcal {F}}\{{\tfrac {1}{\sqrt {a}}}\operatorname {rect} \left({\tfrac {t}{a}}\right)*{\tfrac {1}{\sqrt {a}}}\operatorname {rect} \left({\tfrac {t}{a}}\right)\}\\&={\tfrac {1}{a}}\ {\mathcal {F}}\{\operatorname {rect} \left({\tfrac {t}{a}}\right)\}\cdot {\mathcal {F}}\{\operatorname {rect} \left({\tfrac {t}{a}}\right)\}\\&={\tfrac {1}{a}}\ {\mathcal {F}}\{\operatorname {rect} \left({\tfrac {t}{a}}\right)\}^{2}\\&={\tfrac {1}{a}}\ {a}^{2}\ \mathrm {sinc} ^{2}(a\cdot f)={a}\ \mathrm {sinc} ^{2}(a\cdot f).\end{aligned}}} 
This page is based on this 
Wikipedia article  Text is available under the 
CC BY-SA 4.0  license; additional terms may apply.
Images, videos and audio are available under their respective licenses.