resistor needed for 7 segment display

Hello do i need resistor to power arduno to 7 segment display whit 9v battery i am using this display

how much resistance do i need to connect it whit common cathodes

read the datasheet
peak DC forward current per segment is 100mA

R = V/I
= 9V/100ma
= 90 ohms MINIMUM !
For safety increase by 20%
= 108 => 110 (next standard value)
I would use 120 ohms .(per segment)
Failure to use minimum resistance will redult in
immediate destruction.

NOTE: EDITED
Mark is right, you should use the DC FORWARD current per segment (the continuous current),
NOT the PEAK current. (my bad)
(good catch Mark)(haven't had my coffee yet)

so shoud i add resistor to each anode pin or only to 4 common pins

The absolute max forward current is 25mA continuous, 100mA peak. I'd go with 25mA rather than 100mA,
and the foward voltage from the graphs is about 2V

(9V - 2V) / 0.025A = 280 ohms, so 330 is next standard value.

If using a low duty cycle and want upto 100mA, (9 - 2) / 0.1 = 70 ohms, but 68 will do as the forward voltage will be somewhat greater.

Zorko98:
so shoud i add resistor to each anode pin or only to 4 common pins

Each segment needs its current individual limited, or the brightness depends on the number of segments lit
which looks horrid.

what about if i connect it to 4.5v battery pack there is no need for resistors right?

(4.5 - 2) / 0.025 = 100 ohms. You definitely need resistors or else a constant current driver chip.

what about if i connect it to 4.5v battery pack there is no need for resistors right?

To be frank, for someone with no electronics experience you are off to a bad start. (already trying to cut
corners...)

If you're trying to save room they make resistor packs that have multiple resistors in a small package.
You can pwm the segments to control brightness but you still need individual resistors.
Try following advice instead of trying to avoid following advice. You'll have fewer problems. When you learn
enough about electronics you can decide how to do things but if you don't know and you ask , you shouldn't respond with "Do I have to do it that way ?" It's not a good way to start out.

i tryed connecting 330ohm resistor to each segment the brightness goes down alot is there a way to avoid that

i tryed connecting 330ohm resistor to each segment the brightness goes down alot is there a way to avoid that

Instead of rounding UP to 330 , I would round DOWN to 270

check this thread

Zorko98:
i tryed connecting 330ohm resistor to each segment the brightness goes down alot is there a way to avoid that

That’s what limiting the current does. Too much current will degrade/destroy the display, so you do need to limit it to what’s safe for it.