And the believers, the men and the women, are friends to one another; they bid to what is good, and forbid what is wrong; they perform the prayer, and pay zakat, and they obey Allah and His Messenger. Those - upon them Allah will have mercy; Allah is All-mighty, Allwise. (9:71)
The hypocrites, the men and the women, are as one another; they bid to what is wrong, and forbid what is good. (9:67)
The law of attraction and repulsion
The law of "attraction and repulsion" is a law which holds sway throughout the entire order of creation. From the point of view of the scientific school of today, man is quite sure that not a single atom of the world of existence is outside the governance of general attraction, and none can escape it. From the largest of the world's bodies and masses to the smallest of its atoms, all possess this enigmatic force called the force of attraction, and all are, in some way, influenced by it.
Ancient man did not discover the universal general law of attraction, but he did discover attraction in some bodies, and recognised some things as symbolic of this force, such as the magnet and amber. Even so, he did not know of the relationship of attraction between these things and all other things, as he was only acquainted with a particular relationship: that of the magnet to iron, or amber to straw.
Each one of the atoms on atoms which exist between this earth and the heaven Is, for its own kind, like straw and amber. 
Apart from this, there was no talk of the force of attraction with other inanimate bodies; only about the earth was it asked why it was fixed in the middle of the havens. It was believed that the earth was suspended in the middle of space and was attracted on every side, and that since this pull was from all sides, it naturally stayed in the middle and did not incline to any one side. Some people believed that the heavens did not attract the earth, but rather that they repelled it, and that, since the force influencing the earth was equal on all sides, the result was that the earth was fixed in a particular spot and never changed its place.
There was also general belief in the faculty for attraction and repulsion in the case of plants and animals, in the sense that it was recognised that these had three basic faculties: the nutritive faculty, the faculty of growth, and the faculty of reproduction. For the nutritive faculty, they believed there were some subsidiary faculties: attractive, repulsive, digestive and retentive. It was said that there was in the stomach a force of attraction which pulled food towards itself, or, occasionally, when it did not accept the food, excreted or repelled it  ; and similarly it was said that there was a power of attraction in the liver which drew water towards itself.
The stomach draws in bread to its resting place,
The heat of the liver draws in water. 
Attraction and repulsion in the world of man:
The meaning of attraction and repulsion here is not the attractions and repulsions to do with sex, although these too are a particular kind of attraction and repulsion, for they have nothing to do with our discussion and form an independent object of enquiry. Rather the meaning here is the attractions and repulsions which exist among individual human beings in the arena of social life. In human society there are also some forms of cooperation which are based on the sharing of benefits, but these too, of course, are not within the scope of our discussion.
The greatest proportion of friendships and affections, or enmities and hatred are all manifestations of human attraction and repulsion. These attractions and repulsions are based on general resemblance and similarity, or opposition and mutual aversion.  In fact, the basic cause of attraction and repulsion must be looked for in general resemblance and contrariety (taddad), just as in the discussions of metaphysics it has been proved that general resemblance is the cause of union
Sometimes two human beings attract each other, and their hearts wish for them to be friends and companions one with the other. There is a secret in this, and the secret is nothing other than general resemblance. Unless there is a similarity between these two persons, they cannot attract one another and move towards friendship with each other. In general the nearness of both of them is evidence for a kind of similarity and general resemblance between them.
In the second book of Rumi's Mathnavi there is a fine story which illustrates this. A wise man saw a raven who had formed an affection for a stork. They perched together and flew together! Two birds of two different species: the raven had no similarity either in shape or in colour with the stork. The wise man was amazed that they were together. He went close and examined them and discovered that both of them had only one leg.
That wise man said: "I saw companionship
Between a raven and a stock.
Amazed I was, and examined their condition
To see what sign of commonality I could find.
So up I crept, and, to and behold!
I saw that both of them were lame. "
This one-leggedness brought fellowship to two species of animal which were alien to each other. Human beings, too, will never become friends and companions with each other without some reason, just as they will never be enemies without a cause.
According to some, the root of these attractions and repulsions is need, and the elimination of need. They say that man is a creature who is in need, and that he is created essentially in want. He endeavours by his own relentless activity to fill his emptiness and to supply his necessities, but this is impossible unless he joins with an ally and severs his linking relationship with society, so that he can take advantage from his ally by this means and protect himself from damage from some other group. And we will not find any inclination or aversion in man unless it springs from his instinct for taking advantage. According to this theory, the experiences of life and the structure of his primordial nature have brought man up to be attracted and repelled, so that he is enthusiastic about what he reckons is good in life, and keeps away from himself what does not conform with his aims, but is unresponsive when faced by what is neither of these, is that which neither holds out any benefit for him nor is detrimental. In fact, attraction and repulsion are two fundamental pillars of the life of man, and to whatever degree these are reduced, disorder takes the place of order in his life. In the end the one who has the power to fill up the vacuums attracts others to himself, and the one who not only does not fill up these vacuums but rather adds to the vacuums drives people away from himself, and likewise with those who do neither.
Differences between people as regards attraction and repulsion
In terms of attraction and repulsion in relation to other individuals, not all people are the same; indeed they can be divided up into various classes:
1. Individuals who do not attract and do not repel: No one likes them, nor is anyone their enemy; they incite no one's love, affection or attachment, nor anyone's hostility, envy, hatred or odium; they go among men indifferently, just as if a slab of rock were to be among them.
Such a creature is as nothing, produces no effect, a person in whom no positive thing exists either in terms of goodness or in terms of evil (the meaning of "positive" has to do not only with virtue - it has to do with wickedness too). He is an animal, he eats, he sleeps and walks among men. He is like a sheep which is no-one's friend and no-one's enemy, and if he is looked after, if he is given his water and grass, it is because his meat will be consumed after a while. He neither starts any wave of approval, nor any wave of disapproval. Such people form a group of worthless creatures, hollow and vacuous human beings, for man needs to love and to be loved, and we can also say that he needs to hate and to be hated.
2. People who attract but do not repel: They get on well with everybody, they establish cordial relations with all people, they make people of all classes their admirers. In life, everyone likes them, and no-one disowns them, and when they die, the Muslims wash them with water from the spring of Zamzam in Mecca and bury them, while the Hindus cremate them.
So accustom yourself to good and bad, So that after your death
Muslims will wash you in the water of Zamzam, And the Hindus cremate you. 
According to the advice of this poet, in a society where half are Muslims and respect the corpse of a dead man, giving it ghusl (ablution for the dead), and maybe giving it ghusl in sacred water from Zamzam as a result of greater respect, and half are Hindus who cremate the dead and caste their ashes to the wind, one should live in such a way that Muslims accept you as one of theirs and want to wash you after death in water from Zamzam, and Hindus also accept you as one of theirs and want to cremate you after death.
It is often imagined that excellence of character, civility in social intercourse, or, in the language of today "being sociable", consists of just this, making all men one's friends.
However, this is not feasible for the man who has an aim, who follows a path, who, among men, persues a particular way of thinking or ideal, and does not consider his own advantage; such a man, like it or not, has only one face, he is decisive and explicit in his behaviour, unless, of course, he is a hypocrite and double-faced. For not all men think in the same way, or feel in the same way, and not everyone's preferences are of one kind; among men there are those who are just and those who are unjust, there is good and there is bad. Society has its equitable members, and its despotic members; there are just people, there are iniquitous people. These people cannot all love one person, one human being, who seriously persues one goal and thus collides with some of their interests. The only person who will succeed in attracting the friendship of all the various classes and the various idealisms is one who dissimulates and lies, and says and shows to each person what conforms to that person's liking. But if the person is sincere and follows a path, one group will automatically be his friend and another will similarly be his enemy. Any group which follows the same way as him will be pulled towards him, and any group which follows some different way will exclude him and will quarrel with him.
Some Christians, who present themselves and their religion as messengers of peace, believe that the perfect man possesses nothing but love, thus he has nothing but the power of attraction, and perhaps some Hindus also believe the same thing.
One of the things that is very striking in Hindu and Christian philosophy is love. They say that one must cultivate affection for all things and make one's love manifest, and when we come to love everyone what can possible prevent everyone from loving us - the bad will also love us, since they will have seen our love.
But these gentlemen should understand that it is not enough merely to be a man of love, one must also be a man with a path, just as Gandhi said: "This is my religion." Love must coincide with reality and, if it coincides with reality it will have some path which it follows, and following a way creates enemies, whether we wish it or not. In fact, it is the power of repulsion which incites one group to struggle and excludes another group.
Islam is also the law of love. The Qur'an presents the Holy Prophet as a mercy for all Being: (rahmatan li'l alamin )
We have not sent thee, save as a mercy unto all beings (Anbiya', 21:107) .
This means that you (i.e., the Prophet) should be a mercy even for the most dangerous enemy, and should love even them. 
However the love which the Qur'an commands does not mean that we should act towards everyone in conformity with what he likes and what is pleasing to him, that we should behave towards him in such a way that makes him happy and necessarily attracted towards us. Love does not mean that we leave everyone free to follow their inclinations, or still more that we should approve of their inclinations; this is not love, rather it is hypocrisy and double-dealing. Love is that which coincides with reality, it causes one to reach good, and sometimes those things which bring us to the good take a form that does not attract the love and affection of the other person. How many individuals there are to whom someone is loving in this way and who, when they observe that this love is at odds with their own inclinations, become hostile instead of appreciative. Besides, rational and intelligent love is that in which is the good and interest of the whole of mankind, not the good of one individual or one special group. There are many things which can be done to bring good to individuals and to show love for them which are the very same things which bring evil to society as a whole and may be its enemy.
We can find many great reformers in history who endeavoured to ameliorate the situation of society and smooth its sufferings, but who, in exchange, received no acknowledgement but animosity and persecution from people. So it is not the case that everywhere love attracts; indeed love sometimes manifests itself as a great repulsion which brings together whole societies against a man.
`Abdu 'r-Rahman ibn Muljam was one of the most adamant enemies of 'Ali, and `Ali understood well that this man was a very dangerous opponent. Sometimes, even, others would say to him that he was a dangerous man, and that he should get rid of him. But `Ali asked in reply, "Should I punish before the crime? If he is my murderer, I cannot kill my own murderer: he is to murder me, not I him." It was about this person that 'Ali said-
I want him to live; he wants to kill me.' (i.e., "I have love for him, but he is my enemy and has malevolent designs against me.")
Secondly, love is not the only healing drug for mankind; roughness is also necessary for certain tastes and temperaments, and conflict, repelling and driving away are also necessary. Islam is both the religion of attraction and love and the religion of repelling and retribution (niqmah). 
3. People who repel but do not attract: they make enemies but they make no friends. These are also deficient people, and it shows that they are deficient in positive human qualities, for if they partook of human qualities they would have groups, even if they were small in number, who were their supporters and who were attached to them. For there are always good people among humanity, however small their number may be. Even if all men were worthless and unjust, their hostility would be a proof of truth and justice, but it is never the case that all men are bad, just as they are never all good. Naturally, the bad in someone who has an enemy in everyone is to be found within himself, for otherwise how could it be possible for there to be good in the human spirit and then for this man to have no friends. There are no positive sides to the personalities of such individuals; even in their villainous aspects their persons are sour throughout, and they are sour for everyone. There is nothing in them which is sweet even if it be only to a few.
'Ali (as) said:
The most powerless person is he who is unable to find any friends, and more powerless than these is the one who loses his friends and remains alone.'
4. People who both attract and repel: they are people travelling a path, who act in the way of their beliefs and principles; they draw groups of people towards themselves, they take a place in people's hearts as someone loved and wanted. But they also repel certain groups from themselves and drive them away. They make friends as well as enemies; they encourage agreement as well as disagreement.
Such people are also of several kinds, for sometimes both their power of attraction and their power of repelling are strong, sometimes they are both weak, and sometimes there is a difference between them. There are some people with such a personality that their powers of attracting and repelling are both strong, and this is related to how strong the positive and negative degrees in their spirits are. Of course, strength also has degrees, up to the point where the friends that have been attracted will ransom their souls and give themselves up entirely for the cause; and the enemies will also become so head-strong that they will give their lives in their own cause. And it may become so intense that centuries after the death of that person their attraction and repelling will still be effective in people's minds and will exercise a wide influence. This three-dimensional attraction and repelling are among the particular characteristics of the awliya', (the "friends" of Allah), just as the three-dimensional invitations to the way of Allah are peculiar to the chain of the prophets.
In this respect, it must be seen what kinds of people are attracted and what kinds repelled. For example, sometimes those with knowledge are attracted, and those who are ignorant are repelled, and sometimes vice versa. Sometimes noble and civilised people are attracted and the evil and the wicked are repelled, and sometimes vice versa. Thus, friends and enemies, the attracted and the repelled, each one is a clear proof of the essence of such a person.
It is not sufficient merely to have the powers of attracting and repelling, or even that they should be strong, in order that a person's character should become lauded, rather the cause of this is the character itself, and no-one's character is a proof of goodness. All the world's leaders, even criminals such as Changiz Khan, Hajjaj and Mu'awiyah, were people who had both the power to attract and the power to repel. Not unless there are positive points in someone's spirit he can never make thousands of soldiers obedient to him, and subdue their wills; not unless someone has the power of leadership can he gather people around himself to such a degree.
The Iranian king Nadir Shah (b. 1100/ 1688, reigned 1148/ 1736, d.1160/ 1747) was such a person. He cut off so many heads and had so many eyes gouged out of their sockets, but his personality was extraordinarily strong. From a defeated and plundered Iran at the end of the Safavid period he created an army at great cost, and, just like a magnet that attracts iron-fillings, fighting men collected round him who not only saved Iran from foreign powers, but went to the furthermost parts of India and brought new territories under the rule of Iran.
Thus every person attracts his own kind, and drives away those unlike him. A just and noble person attracts towards himself benevolent people who strive for righteousness, and drives away from himself sensual, money-loving, hypocritical people. A criminal person attracts criminals around himself, and repels those who are good.
And, as we pointed out, there is another difference in the strength of the power of attraction. Just as is said about Newton's gravity, that the degree of pull and attraction becomes greater in proportion to the size of the mass of the body and in inverse proportion to the size of the intervening distance, so also among men there is variation in the power of attraction and pull which derives from the individual who has that attraction.
'Ali - one man with two powers
'Ali is one of those persons who have both the power to attract and the power to repel, and his attraction and repelling are extremely strong. Perhaps no attraction and repelling as strong as `Ali's can be found anywhere in any century or epoch. He has had remarkable friends, truly historical persons, ready to sacrifice themselves, forbearing, burning with love for him like flames from a bonfire, and full of light. They deemed giving up their lives in his way to be their aim and their glory, and they became oblivious of everything in their friendship for him. Years, even centuries, have passed since the death of `Ali, but this attraction still sends out the same rays of light, and people are still dazzled when they turn to it.
Throughout his life, noble and civilised individuals, worshippers of God, self-sacrificing, altruistic people, forbearing, merciful and just men, ready to serve the people, rotated round the axis of his existence so that the story of any one of them is instructive; and, after his death, during the times of the caliphate of Mu`awiyah and the Umayyids, great masses of people were arrested for the crime of friendship to him and underwent the most severe tortures, but they did not give way in their friendship and love of 'Ali and stood firm to, the end of their lives.
With other individuals, everything dies when they die and become covered up, their corpses under the earth; but although men of truth die themselves, the following and love that they excite become more brilliant with the passing of the centuries.
We read in history that years and centuries after the death of `Ali people courageously welcomed the arrows of his enemies.
Among all those who were attracted to, and captivated by, `Ali, we can notice Maytham at-Tammar who, twenty years after `Ali's martyrdom, spoke from his crucifixion of `Ali and his virtues and human qualities. In those days, when the entire Islamic people were being suffocated, when all freedoms were quashed and souls became prisoners in their own breasts, when a mortal silence showed like the mist of death on everyone's faces, this man shouted out from the crucifix for people to come and listen to what he would tell them about `Ali. People thronged round from all sides to hear what Maytham had to say. The powerful government of the Umayyids, which saw its own interests in danger, gave the order to put a gag in his mouth, and, after some days, put an end to his life. History bears many traces of this kind of devotion to `Ali.
These kinds of powerful attraction are not specific to any particular time; in all ages we see manifestations of them and their strong effectiveness.
There was a man called Ibn as-Sikkit who was one of the great scholars and figures in Arabic literature, and his name is quoted among the authorities in the Arabic language like as-Sibawayh and others. He lived in the time of the `Abbasid Caliph al-Mutawakkil, about two hundred years after `Ali's martyrdom. In the administration of al-Mutawakkil he was accused of being Shi`ah, but even then, because he was very learned and distinguished, al-Mutawakkil chose him as a teacher for his own children. One day, when al Mutawakkil's children came to him, and Ibn as-Sikkit was present and had that day apparently given them an examination in which they had acquitted themselves well, al-Mutawakkil showed his pleasure with Ibn as-Sikkit, but perhaps because of misgivings due to having heard that he had learnings towards Shi`ite Islam, asked Ibn as-Sikkit whether the two in front of him (i.e. his two sons) were dearer to him or Hasan and Husayn, the two sons of 'Ali.
Ibn Sikkit was greatly disturbed by this question and comparison and became very agitated. He asked himself whether this proud man had reached such a degree that he had begun to compare his own two sons with Hasan and Husayn. He told himself that it was his fault for having been so successful in their education. In reply to al-Mutawakkil he said
"By Allah, I swear the 'Ali's slave, Qanbar, is definitely dearer to me than these two and their father."
al-Mutawakkil gave the order to the assembled people that Ibn as-Sikkit's tongue should be cut out from his throat. History can tell of many completely overwhelmed people who involuntarily sacrificed their lives in the way of love for `Ali. Where can such attraction be found? One cannot imagine that in all the world there is a parallel.
To the same degree, `Ali had stubborn enemies, enemies who set people trembling at the sound of their names. 'Ali is not to be looked at as an individual, but rather as a whole philosophy. And it is for this reason that one group is attracted to him, and one is repelled. Indeed, `Ali was a man of two powers.
* * * * *
. Rumi, Mathnawi', bk.6.
. Nowadays, however, the structure of, the body is thought to be more like a machine, and the action of excretion is likened to a pump.
. Rumi, Mathnavi, ibid.
. As opposed to what is said concerning electric currents, where two similar poles repel each other, while two unlike ones attract each other.
. `Urfi was an Iranian poet (963/1555 - 999/1590) who travelled to India and frequented the Court of the Emperor Akbar.
. It shows, what is more, that he loved all things, even animals and in animate things. Thus we can see in the history of his life that all the things he used had special names. His horses, his swords and his turbans all had special names, and the only reason for this was that all existent things were the objects of the expression of his love and affection; it is as if he considered everything to have an individuality. History bears no trace of any human being with this manner apart from him, and this manner in fact shows that he was the paradigm of human love. When he passed by the mountain of Uhud, he looked at it with kindness through his radiant eyes and with a look overflowing with love, and said: jabal yuhibbuna wa nahibbuh - "It is a mountain which loves us and we love it." He was a man in whose love mountains and stones also shared.
 Biharu 'l-anwar, vo1.42, pp.193-194 (Tehran, new edition).
. Perhaps we should say that retributions are also a manifestation of affectionate sentiments and love. In du`as (supplication to God) we read: "ya man sabaqat rahmatuh ghadabah" - "Oh You in whom mercy and love have taken precedence over anger", i.e., because You want to be merciful You are angry; otherwise, if that mercy and love did not exist, neither would the anger.
It is like a father who becomes angry with his son because he loves him and is concerned for his future. If his son opposes him, he becomes angry, and he may sometimes beat him, but despite however much ruder behaviour he may see from others' sons and children, he never gets worked up by it. In the case of his own son he becomes angry, because he has affection for him; but in the case of others, he does not become angry, for he has no affection.
On the other hand, affections sometimes deceive; that is to say, there are sentiments which the intellect cannot truly understand, as the Qur'an says:
In the matter of God's religion (i.e., the divine laws) let no tenderness for them (the offenders) seize you (an-Nur, 24:2).
The reason for this is that Islam, while it demonstrates concern and affection for individuals, is also concerned about society.
The greatest sin is a sin which appears small in the eyes of man and seems to be of no importance. Amir al-mu'minin said:
The most serious sin is the sin which the sinner imagines to be slight and insignificant. (Nahju 'l-balaghah, Saying no. 340).
The spread of sin is something which hides the seriousness of the sin from people's sights, and makes it seem nothing in the eyes of the individual.
 Nahju 'l-balaghah, Saying no. 11