Is there any component like this

component
Is there a component similar to the one shown in the photo?

What I need is to reduce the voltage in line 2 by a certain percentage. For example, if I set it to -50%, then if the voltage in line 1 is 5V, it will become 2.5V in line 2. If the voltage in line 1 is 3V, then line 2 will be 1.5V.
if i set 100% then whatever voltage is in line1 doesnt matter coz line 2 will be 0

Line 3 can be connected to an Arduino, and I can send analog voltage, I2C, or PWM signals, whichever is necessary to achieve this.

in voltage divider i see i need 2 resistors. but problem is that i need to change percentage of resistence with arduino. example sometimes i want 100% sometimes 50% sometimes 10%

Try making the lower of the two resistors from a digital pot.

However this will not help you unless you can say what you want to do with the voltage.

Please don't ignore questions, we ask these things because they are important.

its just a signal voltage sent to a controller,

Then you have to check if the digital pot you use can withstand the highest voltage you want to feed into that first line 1 input. You haven't mentioned that.

line 1 will be 0-5v and line 2 will be 0.5v

i just want to lower line 2 on percentage

So providing you measure the voltage on line 1 with the analogRead, and power the digital pot with 5V you should be able to calculate the value the analogue pot needs to be to get you what you need on the output.

Use an (I2C) DAC with an external reference. Line 3 is your I2C input to the DAC, line 1 is the reference input and line 2 is the output.

There are digitally controlled potentiometers that could be used as voltage dividers.
Typically controlled by SPI, sometimes I2C. https://ww1.microchip.com/downloads/en/DeviceDoc/22060b.pdf

note that any sort of resistive voltage divider will not allow significant current to be drawn from the output. For that, you'd need to add some sort of amplification after the digital pot.

The concept is certainly possible.
However we would need to know a lot more to give useful advice.
the main question perhaps is what voltages and currents you would expect.

What are --
1. Input voltage range on line-1?
2. Output voltage range on line-2?
3. Which Arduino (UNO/NANO/MEGA) you will be using to provide the control signal on line-3?

was answered

also see the op's reply on your other questions.

OP said in post #1 somethin like:

I have been thinking to propose LM317 based variable voltage regulator (Fig-1, with offset voltage of 1.2V). This is the reason to interrograte OP about the exact range of the input/output voltage.


Figure-1:

OP said Arduino; so, I had wanted to know which type of Arduino?

The later UNO's have a DAC (Digital to Analog Converter) built in, so you can set and vary the output voltage on a special output pin, from your sketch. This issue seems to be crying out for a DAC ...