Science Fiction and fantasy have a locus of intersection, science fantasy. an unstable narrative form which combines features from each genre. A science-fantasy world is one in which the characters or settings or events presuppose at least one clear violation of natural law or scientific necessity, but which explicitly provides an organized or scientific explanation for that violation and which grounds its discourse in a scientific episteme. Science fantasy, like Science Fiction, assumes an orderly universe with regular laws, but, like fantasy, contains at least one explicit reversal of current natural law. An examination of two science-fantasy texts, Fritz Leiber's Conjure Wife (1953) and Stanislaw Lem's The Investigation (1959), enables us to establish the boundaries and thematic concerns of this narrative form. The types of science fantasy can be identified by the nature of the violation of natural law. Four main types involve the time-loop motif, the alternate-present world, the counter scientific world, and the hybridized world. As a subgenre, science fantasy tends to interrogate science by calling into question basic scientific assumptions about the physical world. At the same time it explores fantasy by questioning the unreality of the terrors and desires that haunt the value-laden world of dreams. Like "magic realism," with which it shares some features, science fantasy is experiencing a growing popularity, in part because in its counternatural worlds, the actual and the imaginary, the prosaic and the magical, the scientific and the mythical, can meet and interanimate, in part because these worlds provide us with "such beauty, awe, or terror as the actual world does not supply" (C.S. Lewis).
Science Fiction Studies
Malmgren, Carl D. "Towards a Definition of Science Fantasy." Science Fiction Studies 15.3  (1988): 259-281.