It is known that a decoder take n inputs and can have \$ n^2 \$ output. Each input only constitute to 1 unique output.
This is incorrect. The number of possible combinations if n bits is \$ 2^n \$, not \$ n^2 \$. So 3-bits gives \$ 2^3 = 8 \$, not \$ 3^2 = 9\$ combinations. (Note that when n = 4 the answer happens to be the same and this may have caused your confusion.)
However, I read that seven segment decoder can take multiple input and produce multiple output at one time (to light up the LED).
You haven't quoted your source or given any context (and you should have) but it sounds as though you are describing a multiplexed 7-segment display.
I am confused about this concept that why seven segment decoder can produce multiple output while the theory said that it can only produce 1 output.
Figure 1. A multiplexed 7-segment dispay on a darkroom timer circuit. Source: 320 volt.
Note that one CD4511 seven segment display driver is driving all four 7-segment common cathode LEDs. The cathodes are connected to ground via the PNP transistors.
How it works:
- The PIC micro sets up the binary code for the first digit and feeds this to the CD4511 inputs 8-4-2-1. These are immediately decoded and put out on the segment lines a-b-c-d-e-f. When ready the PIC pulls RB3 low, turning on the connected PNP transistor which will, in turn, light the segments powered by the 4511.
- The RB3 PNP is then switched off, the next digit set up on the CD4511 inputs 8-4-2-1 and RB2 pulled low to light the second display.
- The sequence continues lighting each of the other two displays.
This happens fast enough that the eye can't detect the flicker. The LEDs can be pulsed at higher than their continuous rating to give a normal average light output.
A 1-of-n binary decoder has n output bits, ...
This is a different type of decoder.
Figure 2. A 3 to 8 binary decoder. This is designed to switch on one of its outputs depending on the binary pattern on its input. Note the simple AND gate logic used.
You need to come up with a more general definition of "decoder". Wikipedia's Binary decoder definition may be of use:
In digital electronics, a binary decoder is a combinational logic circuit that converts a binary integer value to an associated pattern of output bits. They are used in a wide variety of applications, including data demultiplexing, seven segment displays, and memory address decoding.
There are several types of binary decoders, but in all cases a decoder is an electronic circuit with multiple data inputs and multiple outputs that converts every unique combination of data input states into a specific combination of output states. In addition to its data inputs, some decoders also have one or more "enable" inputs. When the enable input is negated (disabled), all decoder outputs are forced to their inactive states. [Emphaisis mine.]