Skip to content

Properties and the inverse z-transform

Learn six rules for X(z), then recover samples two ways, one geometric sequence per pole and long division, one sample per step.

Before this12.3 · 16.1 · 5 more
Chapter 16 · Lesson 2 of 5

First, the picture

Where this page ends up: a ratio in z−1z^{-1} split into one geometric sequence per pole. Watch the two sequences add, sample by sample, to the signal.

One sequence per pole

X(z) = 1/(1 − 0.25z⁻¹ − 0.125z⁻²), right-sided. Its poles are 0.5 and −0.25.

Two poles, 0.5 and −0.25. The cover-up gives each one a weight.

weight of pole 0.5
not yet
weight of pole −0.25
not yet
0.00 / 14.00 s
Describe this picture

A plane with the two poles of X(z)=1/(1−0.25z−1−0.125z−2)X(z) = 1/(1 - 0.25z^{-1} - 0.125z^{-2}), right-sided, marked by crosses at 0.5 and −0.25, with the unit circle labelled “unit circle”, and beside it a plot of stems against sample nn. The clip plays by itself. It starts with the caption “Two poles, 0.5 and −0.25. The cover-up gives each one a weight.” The stems of pole 0.5 appear with dot heads, labelled “(2/3)·0.5ⁿ”, and the caption “Pole 0.5 gives (2/3)·0.5ⁿ: it starts at 0.667 and halves every sample.” Then the stems of pole −0.25 appear with square heads, labelled “(1/3)·(−0.25)ⁿ”, and the caption “Pole −0.25 gives (1/3)·(−0.25)ⁿ: it starts at 0.333, shrinks to a quarter and flips sign every sample.” Two readouts, the weight of pole 0.5 and the weight of pole −0.25, read “not yet”, then 0.667, then 0.333. Last, diamonds rise to the sums, labelled “x[n], their sum”, and the caption ends “Added, they give x[n] = 1, 0.25, 0.1875, 0.0781, …, the same numbers the recursion y[n] = 0.25y[n−1] + 0.125y[n−2] + x[n] gives for an impulse.”

After the clip a dotted vertical cursor over the stems, named “Sample n”, reads the two terms and their sum at any nn; the hint reads “Drag along the samples, or use the arrow keys, to read the two terms and their sum at any n.” At n=1n=1 the caption reads “n = 1: 0.333 − 0.083 = 0.250.”; at n=2n=2 it gives 0.167+0.021=0.1880.167+0.021=0.188.

Six rules, each one line from the sum

The z-transform (16.1) turned a sequence x[n]x[n] into a function X(z)=∑nx[n]z−nX(z)=\sum_n x[n]z^{-n}, with a region of convergence, the ROC. This page does two jobs. It lists the rules that let me work on X(z)X(z) instead of on the samples, and then it goes back from X(z)X(z) to the samples.

Every rule is proved from the sum. I use the pairs of 16.1: anu[n]↔11−az−1a^nu[n]\leftrightarrow\dfrac1{1-az^{-1}} for ∣z∣>∣a∣\lvert z\rvert > \lvert a\rvert, and its left-sided partner.

Linearity. The sum is linear, so ax[n]+by[n]↔aX(z)+bY(z)ax[n]+by[n]\leftrightarrow aX(z)+bY(z). The ROC contains at least the overlap of the two ROCs. It can be larger, if a pole cancels.

Delay. Put m=n−n0m=n-n_0 in the sum:

∑nx[n−n0] z−n=∑mx[m] z−(m+n0)=z−n0X(z).\sum_n x[n-n_0]\,z^{-n}=\sum_m x[m]\,z^{-(m+n_0)}=z^{-n_0}X(z).

A delay by n0n_0 samples multiplies X(z)X(z) by z−n0z^{-n_0}. The ROC stays the same, except possibly at z=0z=0 and at infinity. In particular, one delay box is z−1z^{-1}.

Multiplying by ana^n. Write anz−n=(z/a)−na^nz^{-n}=(z/a)^{-n}. Then

∑nanx[n] z−n=∑nx[n] (z/a)−n=X(z/a).\sum_n a^nx[n]\,z^{-n}=\sum_n x[n]\,(z/a)^{-n}=X(z/a).

Wherever XX had a pole pp, X(z/a)X(z/a) has a pole at apap. The plane is stretched by the factor ∣a∣\lvert a\rvert and turned by the angle of aa. Take a=−1a=-1 and x[n]=0.5nu[n]x[n]=0.5^nu[n]. Then (−1)n0.5nu[n]=(−0.5)nu[n](-1)^n0.5^nu[n]=(-0.5)^nu[n], whose transform is 11+0.5z−1\dfrac1{1+0.5z^{-1}}. The pole moved from 0.5 to −0.5-0.5: with a=−1a=-1 the plane turns half a turn.

Multiplying by nn. Differentiate the sum term by term: dXdz=∑n(−n) x[n] z−n−1\dfrac{dX}{dz}=\sum_n(-n)\,x[n]\,z^{-n-1}. Multiply by −z-z and the power goes back to z−nz^{-n}:

n x[n] ↔ −z dXdz.n\,x[n]\ \leftrightarrow\ -z\,\frac{dX}{dz}.

Try it on 0.5nu[n]0.5^nu[n], with X=(1−0.5z−1)−1X=(1-0.5z^{-1})^{-1}. The derivative is −(1−0.5z−1)−2⋅0.5z−2-(1-0.5z^{-1})^{-2}\cdot0.5z^{-2}, so

n 0.5nu[n] ↔ 0.5z−1(1−0.5z−1)2.n\,0.5^nu[n]\ \leftrightarrow\ \frac{0.5z^{-1}}{(1-0.5z^{-1})^2}.

The ratio has the pole 0.5 twice. Running this ratio as a recursion with an impulse in gives the samples 0, 0.5, 0.5, 0.375, 0.25, 0.15625, and n 0.5nn\,0.5^n at n=0n=0 to 5 is the same list.

Convolution. For the sequences xx and hh, the convolution sum from Discrete convolution (5.2) is ∑kx[k] h[n−k]\sum_k x[k]\,h[n-k]. Put it into the z-sum and swap the order of the two sums. The delay rule turns the inner sum into z−kH(z)z^{-k}H(z), and what is left is

x∗h ↔ X(z) H(z).x*h\ \leftrightarrow\ X(z)\,H(z).

This is the rule of Properties of the DTFT (12.3), now at every zz in the ROC, not only on the unit circle. The ROC contains at least the overlap of the two. I will check it on numbers below.

The first sample. Suppose xx is causal, which means x[n]=0x[n]=0 for n<0n<0. Then X(z)=x[0]+x[1]z−1+x[2]z−2+⋯X(z)=x[0]+x[1]z^{-1}+x[2]z^{-2}+\cdots. Let ∣z∣\lvert z\rvert grow without limit. Every term but the first carries a z−nz^{-n} with n≥1n\ge1 and shrinks to 0, so

x[0]=lim⁡z→∞X(z).x[0]=\lim_{z\to\infty}X(z).

This is the initial value theorem. Take Y(z)=1+2z−11−0.5z−1Y(z)=\dfrac{1+2z^{-1}}{1-0.5z^{-1}}, which appears again below. At z=10z=10 it is 1.263, at z=100z=100 it is 1.025 and at z=104z=10^4 it is 1.00025. It is heading for y[0]=1y[0]=1.

Every delay box is z⁻¹

In Difference equations (6.1) the equation y[n]=x[n]+2x[n−1]+0.5y[n−1]y[n]=x[n]+2x[n-1]+0.5y[n-1] was drawn as wires, delay boxes and gains. The delay rule says what each box does to the transforms: it multiplies by z−1z^{-1}.

x[n]z⁻¹×2+y[n]×0.5z⁻¹
Fig. By the delay rule each delay box multiplies by z⁻¹, so the diagram can be read straight into the algebra.

Read the diagram as algebra. The adder collects the input, the delayed and doubled input, and the delayed and halved output:

Y=X+2z−1X+0.5z−1Y.Y=X+2z^{-1}X+0.5z^{-1}Y.

Collect the YY terms to get (1−0.5z−1)Y=(1+2z−1)X(1-0.5z^{-1})Y=(1+2z^{-1})X. With an impulse in, X=1X=1, so

Y(z)=1+2z−11−0.5z−1.Y(z)=\frac{1+2z^{-1}}{1-0.5z^{-1}}.

The rest of the page goes the other way, from a ratio like this back to its samples.

One sequence per pole

Take

X(z)=11−0.25z−1−0.125z−2=1(1−0.5z−1)(1+0.25z−1),X(z)=\frac1{1-0.25z^{-1}-0.125z^{-2}}=\frac1{(1-0.5z^{-1})(1+0.25z^{-1})},

right-sided, with ROC ∣z∣>0.5\lvert z\rvert > 0.5. Multiply out the two brackets and you get the bottom on the left, so the factoring is right. The poles are 0.5 and −0.25-0.25.

The idea is the one from Properties and the inverse Laplace transform (9.2), done in z−1z^{-1}. Split XX into one term per pole, with a weight rkr_k for the pole pkp_k:

X(z)=r11−0.5z−1+r21+0.25z−1.X(z)=\frac{r_1}{1-0.5z^{-1}}+\frac{r_2}{1+0.25z^{-1}}.

To find r1r_1, multiply both sides by (1−0.5z−1)(1-0.5z^{-1}) and set z=0.5z=0.5, so that z−1=2z^{-1}=2. The second term is multiplied by zero and vanishes. On the left what remains is r1=11+0.25⋅2=23r_1=\dfrac1{1+0.25\cdot2}=\dfrac23. Likewise, setting z=−0.25z=-0.25, so that z−1=−4z^{-1}=-4, gives r2=11−0.5⋅(−4)=13r_2=\dfrac1{1-0.5\cdot(-4)}=\dfrac13.

Each term is a pair from 16.1, anu[n]a^nu[n] with its weight, so x[n]=23 0.5nu[n]+13 (−0.25)nu[n]x[n]=\tfrac23\,0.5^nu[n]+\tfrac13\,(-0.25)^nu[n]. Make a guess. The second pole is negative. What will its sequence do from one sample to the next? Then look again at the picture at the top of this page, which plays this split.

Pole 0.5 gives 23 0.5n\tfrac23\,0.5^n: it starts at 0.667 and halves every sample. Pole −0.25-0.25 gives 13(−0.25)n\tfrac13(-0.25)^n: it starts at 0.333, shrinks to a quarter and flips sign every sample, as you guessed. Added, they give x[n]=1x[n]=1, 0.25, 0.1875, 0.0781, …, the same numbers the recursion y[n]=0.25y[n−1]+0.125y[n−2]+x[n]y[n]=0.25y[n-1]+0.125y[n-2]+x[n] gives for an impulse. When the clip has finished, drag along the samples to read the two terms and their sum at any nn: at n=1n=1 it is 0.333−0.083=0.2500.333-0.083=0.250.

Check the answer another way. The two brackets are the transforms of 0.5nu[n]0.5^nu[n] and (−0.25)nu[n](-0.25)^nu[n], and a product of transforms is a convolution. Convolve those two sequences and the first samples are again 1, 0.25, 0.1875, 0.078125, the same as the sum of the two terms. That is the convolution rule on real numbers.

SciPy does the splitting. residuez(b, a) takes the coefficients of the top and bottom in powers of z−1z^{-1} and returns the weights r, the poles p, and a direct term k. The direct term is non-empty when the top is as long as the bottom or longer. For this XX, residuez([1], [1, -0.25, -0.125]) returns the weights 0.3333 at −0.25-0.25 and 0.6667 at 0.5, and no direct term.

Three variations. A mirror pair of poles has mirror weights, as in 9.2, and the two terms add to a damped cosine. A repeated pole gives an n anu[n]n\,a^nu[n] term, the multiplying-by-nn row. For n 0.5nu[n]n\,0.5^nu[n] above, residuez returns the pole 0.5 twice, with the weights −1-1 and 1 for the terms in 11−0.5z−1\dfrac1{1-0.5z^{-1}} and 1(1−0.5z−1)2\dfrac1{(1-0.5z^{-1})^2}. And for another ROC the fractions are the same, but a pole outside the ROC gives a left-sided term −anu[−n−1]-a^nu[-n-1], as in 16.1.

Divide, and the samples come out one by one

There is a method with no poles in it. Take Y(z)=1+2z−11−0.5z−1Y(z)=\dfrac{1+2z^{-1}}{1-0.5z^{-1}} from the diagram, where the input is an impulse. Divide the top by the bottom as with numbers, but with powers of z−1z^{-1}, highest power first, which means z0z^0 first.

It works like dividing 1 by 7 on paper: each step gives one digit of 0.142857… Here each step gives one sample. Before you watch, make a guess. 1−0.5z−11-0.5z^{-1} goes into 1+2z−11+2z^{-1} once. What is left over?

Then watch each remainder: after the first step it is half the one before.

Divide, and the samples come out one by one

Y(z) = (1 + 2z⁻¹)/(1 − 0.5z⁻¹): 6.1's y[n] = x[n] + 2x[n−1] + 0.5y[n−1], with an impulse in.

Divide 1 + 2z⁻¹ by 1 − 0.5z⁻¹, starting from the highest power, z⁰.

steps done
0
remainder
1 + 2z⁻¹
5
0.00 / 17.00 s
Describe this picture

The division Y(z)=(1+2z−1)/(1−0.5z−1)Y(z) = (1 + 2z^{-1})/(1 - 0.5z^{-1}), which is 6.1’s y[n]=x[n]+2x[n−1]+0.5y[n−1]y[n] = x[n] + 2x[n-1] + 0.5y[n-1] with an impulse in, plays by itself. The division panel shows the divisor 1−0.5z−11 - 0.5z^{-1} and the quotient growing term by term; a plot of square-headed stems against sample nn receives one stem per finished step. Two readouts, the steps done and the remainder, start at 0 and 1+2z−11+2z^{-1}, with the caption “Divide 1 + 2z⁻¹ by 1 − 0.5z⁻¹, starting from the highest power, z⁰.” At step 1: “1 − 0.5z⁻¹ goes into 1 once: x[0] = 1. What is left is 2.5z⁻¹.” At step 2: “It goes into 2.5z⁻¹ 2.5z⁻¹ times: x[1] = 2.5, and 1.25z⁻² is left.” At step 3, with the remainder 0.625z−30.625z^{-3}: “x[2] = 1.25. Each remainder is half the last one: the 0.5 in the loop.” Step 4 gives x[3]=0.625x[3]=0.625 and leaves 0.3125z−40.3125z^{-4}. The last caption is “x = 1, 2.5, 1.25, 0.625, 0.3125, …: 6.1’s impulse response, one sample per step of the division.”, and the readouts then read 5 and 0.15625z−50.15625z^{-5}.

After the clip a slider named “Division steps” runs from 0 to 8, with the hint “Use the slider or the arrow keys to run the division for 0 to 8 steps.” At 6 steps the caption is “Step 6: x[5] = 0.15625, and 0.078125z⁻⁶ is left.”

What is left after the first step is 2.5z−12.5z^{-1}. The quotient is 1, 2.5, 1.25, 0.625, 0.3125, …: 6.1’s impulse response, one sample per step of the division. Why does this give the same numbers as running the equation? After the first step, each remainder is 0.50.5 times the sample just found, pushed one place later. That is what the delay box holds: the previous output, halved. Each step of the division is one pass of the loop.

For a recursion the division never ends. It gives the power series of a right-sided signal, one more sample for each extra step, and I stop when I have enough. For a left-sided signal I would divide in powers of zz instead.

The same YY by partial fractions has a direct term, because the top is as long as the bottom. residuez([1, 2], [1, -0.5]) returns the weight 5 at the pole 0.5 and the direct term −4-4. So y[n]=−4 δ[n]+5⋅0.5nu[n]y[n]=-4\,\delta[n]+5\cdot0.5^nu[n], which gives 1, 2.5, 1.25, 0.625, … again: at n=0n=0, −4+5=1-4+5=1, and for n≥1n\ge1 it is 5⋅0.5n5\cdot0.5^n. The initial value theorem agrees: Y(z)→1Y(z)\to1 as z→∞z\to\infty. A third method is to read the table by eye, when the ratio is simple enough.

Worked example

  1. Partial fractions. X=11−0.25z−1−0.125z−2X=\dfrac1{1-0.25z^{-1}-0.125z^{-2}}. The cover-up gives r=23r=\tfrac23 at p=0.5p=0.5 and r=13r=\tfrac13 at p=−0.25p=-0.25, so x[n]=23 0.5n+13(−0.25)nx[n]=\tfrac23\,0.5^n+\tfrac13(-0.25)^n for n≥0n\ge0. The first seven samples are 1, 0.25, 0.1875, 0.07813, 0.04297, 0.02051 and 0.0105. Running the recursion and convolving 0.5nu[n]0.5^nu[n] with (−0.25)nu[n](-0.25)^nu[n] give the same list.
  2. Long division. Y=1+2z−11−0.5z−1Y=\dfrac{1+2z^{-1}}{1-0.5z^{-1}} gives the quotient 1, 2.5, 1.25, 0.625, 0.3125, 0.15625 and the remainders 2.5z−12.5z^{-1}, 1.25z−21.25z^{-2}, 0.625z−30.625z^{-3}, 0.3125z−40.3125z^{-4}, 0.15625z−50.15625z^{-5}, 0.078125z−60.078125z^{-6}. With residuez, y[n]=−4δ[n]+5⋅0.5ny[n]=-4\delta[n]+5\cdot0.5^n gives the same samples.
  3. Initial value. Y(z)Y(z) at z=10z=10, 100 and 10410^4 is 1.263, 1.025 and 1.00025, tending to y[0]=1y[0]=1. For the first example’s XX the values are 1.027, 1.0025 and 1.000025.
  4. Multiplying by nn. n 0.5nu[n]↔0.5z−1(1−0.5z−1)2n\,0.5^nu[n]\leftrightarrow\dfrac{0.5z^{-1}}{(1-0.5z^{-1})^2}. Its impulse response is 0, 0.5, 0.5, 0.375, 0.25, 0.15625, which is n 0.5nn\,0.5^n.
  5. Multiplying by ana^n. (−1)n0.5nu[n]=(−0.5)nu[n]↔11+0.5z−1(-1)^n0.5^nu[n]=(-0.5)^nu[n]\leftrightarrow\dfrac1{1+0.5z^{-1}}. The pole moved from 0.5 to −0.5-0.5.

Where you’ll meet this

Digital filters are described by ratios of polynomials in z−1z^{-1}. Partial fractions split such a ratio into one first-order piece per pole, and each piece is one geometric sequence. A filter built from first-order sections in parallel is exactly that sum.

Long division is the checking tool: a few steps give the first samples of the impulse response without running any code, and they must agree with lfilter. The next pages use the same ratios to read behaviour from where the poles sit. See Transfer functions, poles and zeros (16.3), Stability and causality (16.4), where the left-sided terms matter, and The unilateral z-transform (16.5), where starting values enter through the delay rule.

The maths behind it · eigenvalues and eigenvectors

Splitting into partial fractions is a change of basis. The recursion’s state, written in the right coordinates, moves along independent directions, one per pole, each multiplied by its pole at every step. The poles are the eigenvalues of the recursion’s state matrix and the directions are its eigenvectors, which finishes the picture begun in 6.1.

The maths behind it · generating functions

The convolution rule is why sums of independent whole-number random variables are easy with generating functions (16.1). The distribution of the sum is the convolution of the two distributions, so its generating function is the product of theirs.

Reference card

QuantityFormulaNotes
Linearityax[n]+by[n]↔aX(z)+bY(z)ax[n]+by[n]\leftrightarrow aX(z)+bY(z)ROC at least the overlap
Delayx[n−n0]↔z−n0X(z)x[n-n_0]\leftrightarrow z^{-n_0}X(z)a delay box is z−1z^{-1}
Multiply by ana^nanx[n]↔X(z/a)a^nx[n]\leftrightarrow X(z/a)poles move from pp to apap
Multiply by nnn x[n]↔−zdXdzn\,x[n]\leftrightarrow-z\dfrac{dX}{dz}gives n anu[n]n\,a^nu[n]
Convolutionx∗h↔X(z)H(z)x*h\leftrightarrow X(z)H(z)ROC at least the overlap
Initial valuex[0]=lim⁡z→∞X(z)x[0]=\lim_{z\to\infty}X(z)causal xx
Partial fractionsX=∑krk1−pkz−1X=\sum_k\dfrac{r_k}{1-p_kz^{-1}} (+ direct terms)rk=[(1−pkz−1)X]z=pkr_k=\big[(1-p_kz^{-1})X\big]_{z=p_k}
Each termrkpknu[n]r_kp_k^nu[n], or −rkpknu[−n−1]-r_kp_k^nu[-n-1] if pkp_k is outside the ROC16.1’s pairs
Long divisiondivide in powers of z−1z^{-1}one sample per step; right-sided
SciPyr, p, k = residuez(b, a)k = direct terms

End of lesson 16.2

Where to go next.

Phasorium
LibraryEvery lesson, in order

Parts

About Phasorium
Look