what is the relation between the ego and the subject? According to Freud, the ego is an agency of the psyche,by means of which the subject acquires a sense of unity and identity, "a coherent organization of mental processes." (XIX,17.) Through consciousness , the ego is the site of differentiation between inside and outside, between "subjective" and "objective." The passage from the ego as biological individual to the ego as an agency: "such is the entire problematic of the derivation of the psychoanalytic ego . " (Jean Laplanche, Life and Death in Psychoanalysis, p. 76) 

(see schizophrenia as "weak ego function.")

Michael Druks: "Druksland" from Flexible Geography 1974 in:  Cartes et Figures de la Terre , Paris, Pompidou Center 1980

Michael Druks: "Druksland" from Flexible Geography 1974
in: Cartes et Figures de la Terre, Paris, Pompidou Center 1980

"The ego is first and foremost a body-ego. It is not merely a surface entity, but is in itself a projection of a surface." (The Ego and the Id, p. 26) cf map and territory: cartography as a metaphor for identifying the self -- by exploring, naming, and associating... The ego is ambiguously a mental and corporeal concept. In his essay "On Narcissism," of 1914, Freud describes the origin of the ego in terms of the subject's ability to take itself or part of its own body as a love object. Later, in The Ego and the Id, (1923) the ego is seen as a mediator between the two contradictory terms of the instinctual or corporeal strivings of the Id on one hand, and the demands and requirements of "reality" or "civilization" for the modification, control, or postponemenent of instinctual satisfaction on the other. (see Grosz, Volatile Bodies, p.29) (see narcissism.) 

In the latter essay, Freud presents and account of the structure and form of the ego as a corporeal projection. In the neonate, there is no ego, at least not in usual sense of the word. In the preobject stage, the child is a (passive) conglomerate of fleeting experiences, which later become organized through primary narcissism (Lacan's " mirror stage") at around six months of age. At this point the division between subject and object becomes possible as the result of two complementary processes: a series of identificatory relations with other subjects, particularly the mother or even its own image in the mirror, and the construction of a psychical map of the body's libidinal intensities through the narcissistic attachment to a part or the whole of the body. (cf body image)This latter process amounts to a cartography of the erotogenic zones of the body, a mental projection of its surface. In the establishment of the ego, perceptual processes are themselves sexualized, libidinally invested. (see pyscho-sexual space)

Jean Laplanche describes two paths towards object-choice that emerge from the introduction of narcissism. One is the anaclitic object choice, in which self-preservation shows the way to sexuality. "In connection with the object-choice of infants (and of growing children) what we first noticed was that they derived their sexual objects from their experiences of satisfaction." The other path is the narcissistic path, modelled on the self. The spectrum of possible narcissistic choices is presented by Freud, not only in the image of whom one is presently, but also of "what one once was -- what one would like to be -- someone who was once part of oneself." (see Life and Death in Psychoanalysis, Chapt. 4, "The Ego and Narcissism") 

what are the superego and the ego-ideal 

Didier Anzieu describes Freud as reserved in doing but transgressive in thinking, as opposed to most of his contemporaries, who were libertine in act and inhibited in thought and speech. Freud's superego simply forbade him to act, while the ego-ideal encouraged him to think.

Freud describes the ego-ideal formation in "Group Psychology and the Analysis of the Ego" (1912). "The ego now enters into the relation of an object to the ego ideal which has been developed out of it and...all the interplay between an external object and the ego as a whole, with which our study of the neuroses has made us aquainted, may possibly be repeated upon this new scene of action within the ego." (p.130) 

In the course of discussing superego formation in The Ego and the Id, Freud speaks of the transformation of an erotic object-choice (oedipal relations) into an alteration of the ego, (p.30) that is, a transformation of object libido into narcissistic libido. While this entails a desexualization, a kind of sublimation, it must be remembered that narcissistic libido is still libido -- not in the original narrow sense of sexual-object cathexis, but in the widened sense of the life or love instinct, of eros. 

In Love's Body, Norman O. Brown turns psychoanalysis against itself to disclose the pathology of the process of construction of a self based on love and hate -- on the childish decision to claim all that the ego likes as "mine" and to repudiate all that the ego dislikes as "not mine." This process by which the self is constituted does not end at childhood but is a process of continuous creation. (a dissipative structure?) For Brown, "The erection of the boundary does not alter the fact that there is no boundary." (p.143) It results in alienation. He pursues this Freudo-Marxian synthesis by describing personality as the original private property, quoting Locke, who refers to "that property which men have in their persons as well as goods." Pursuing a military analogy of the "defense mechanisms" and "character armor" that fortify the false frontiers of the ego, Brown claims that "to have a self is to have enemies, and to be a self is to be at war." (p.149) These enemies are not only outside. Following Freud's account in "The Two Principles in Mental Functioning" (15n.) Brown identifies separation (on the outside) with repression (on the inside). The essence of repression, says Freud, is to treat an inner stimulus as if it were an outer one. (see unconscious)

For Brown, "The conclusion of the whole matter is, break down the boundaries." (p.149) "To give up boundaries is to give up the reality principle...the false boundary drawn between inside and outside, subject and object, real and imaginary, physical and mental." (see discussion of pleasure and reality principles in play.) But, according to Brown, "Freud remained officially faithful to the principle whose pretensions he finally exposed," describing the contents of the unconscious as "fantasy", and advocating that "adaption to reality" which abandons the over-valuation of mental processes as compared to reality. Instead, Brown claims that "The real world, which is not the world of the reality principle, is the world where thoughts are omnipotent, where no distinction is drawn between wish and deed." (see body thinking as Brown's alternative) "It is not schizophrenia but normality that is split-minded; in schizophrenia the false boundaries are disintegrating." (159) (cf body image and BwO)(cf also psycho-sexual space) Most contemporary psychoanalytic thinking would describe such states as "dissociative."