We took same input l for all antenna elements, so, in a way,
what we achieved is, beamforming for one layer (i.e. one stream of data) with one beam.
If we want to transmit 2 layers, we can use half of the antenna elements for one layer and the remaining for second layer.
Phase shift will be same for both the beams.
So, this will work if the polarisation of the antenna elements chosen for first layer is orthogonal to the polarisation of the antenna elements chosen for second layer.
Polarisation is a directional characteristic of the antenna elements (vertical, horizontal, circular, and so on).
This is illustrated in figure below.
Fig "Cross-polarised beams"
5G NR indeed uses cross-polarised antenna elements.
This means, Beamforming Precoding matrix takes the form as shown in above figure.
We may call these beams "cross-polar beams".
Beamforming and MIMO
5G NR uses Beamforming when number of antenna ports are 4 or more (4, 8, 12, 16, 24, and 32).
Beamforming is used not only for MU-MIMO but also for SU-MIMO.
The idea in using Beamforming in SU-MIMO is to support higher number of layers.
Fig "One UE, two beams"
In scenario shown in above figure, Beamforming Precoding will not be sufficient as
the reflected waves from the second beam will reach the UE bit later compared to the first beam.
This is the classic multipath-propagation scenario of MIMO.
So, in addition to Beamforming Precoding, we will need MIMO Precoding here.
Another way to look at it is from the point of view of correlation between antenna elements.