Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • System Modeler

    Multidomain modeling and simulation of complex systems

  • Compute ServicesUse with Mathematica and Wolfram|One
  • AI AccessUse with Mathematica and Wolfram|One
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Wolfram|Alpha

  • Wolfram|Alpha Website
  • Wolfram|Alpha APIs

AI Products

  • Wolfram AI Ecosystem
  • Wolfram Foundation Tool
  • Wolfram Cloud MCP
  • Wolfram Local MCP
  • Agent One API
  • CAG Component APIs

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • Linguistic Understanding

Additional Deployment Options

  • Wolfram Cloud
  • Wolfram Web Engine
  • wolframscript
  • WSTPServer
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

Wolfram Consulting

Data Science, Finance & Business

  • Artificial Intelligence
  • Data Science
  • Healthcare
  • Real Estate

Engineering

  • Civil Engineering
  • Automotive Engineering
  • Sustainable Energy

Science & Technology

  • AgTech
  • Biosciences
  • Environmental Science
  • Food Science
  • Quantum Computation
  • Social and Behavioral Sciences

More Wolfram Solutions

Technology for Education

  • Research Universities
  • Colleges & Teaching Universities
  • High Schools
  • Resources for Students

Education Initiatives

  • Next-Gen EdTech
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
For AIs
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • System Modeler
    • Compute ServicesUse with Mathematica and Wolfram|One
    • AI AccessUse with Mathematica and Wolfram|One
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Wolfram|Alpha
      • Wolfram|Alpha Website
      • Wolfram|Alpha APIs
    • AI Products
      • Wolfram AI Ecosystem
      • Wolfram Foundation Tool
      • Wolfram Cloud MCP
      • Wolfram Local MCP
      • Agent One API
      • CAG Component APIs
    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • Linguistic Understanding
    • Additional Deployment Options
      • Wolfram Cloud
      • Wolfram Web Engine
      • wolframscript
      • WSTPServer
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions
    • Wolfram Consulting

    Data Science, Finance & Business

    • Artificial Intelligence
    • Data Science
    • Healthcare
    • Real Estate

    Engineering

    • Civil Engineering
    • Automotive Engineering
    • Sustainable Energy

    Science & Technology

    • AgTech
    • Biosciences
    • Environmental Science
    • Food Science
    • Quantum Computation
    • Social and Behavioral Sciences

    More Wolfram Solutions

    Technology for Education

    • Research Universities
    • Colleges & Teaching Universities
    • High Schools
    • Resources for Students

    Education Initiatives

    • Next-Gen EdTech
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • For AIs
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
GraphJoin
  • See Also
    • GraphDisjointUnion
    • GraphUnion
    • GraphIntersection
    • GraphSum
    • GraphProduct
    • GraphComplement
    • GraphPower
    • ReverseGraph
    • LineGraph
  • Related Guides
    • Graph Operations and Modifications
    • See Also
      • GraphDisjointUnion
      • GraphUnion
      • GraphIntersection
      • GraphSum
      • GraphProduct
      • GraphComplement
      • GraphPower
      • ReverseGraph
      • LineGraph
    • Related Guides
      • Graph Operations and Modifications

GraphJoin[g1,g2]

gives the graph join of the graphs g1 and g2.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Directed Graphs  
Undirected Graphs  
Mixed Graphs  
Multigraphs  
Weighted Graphs  
Special Graphs  
Properties & Relations  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • GraphDisjointUnion
    • GraphUnion
    • GraphIntersection
    • GraphSum
    • GraphProduct
    • GraphComplement
    • GraphPower
    • ReverseGraph
    • LineGraph
  • Related Guides
    • Graph Operations and Modifications
    • See Also
      • GraphDisjointUnion
      • GraphUnion
      • GraphIntersection
      • GraphSum
      • GraphProduct
      • GraphComplement
      • GraphPower
      • ReverseGraph
      • LineGraph
    • Related Guides
      • Graph Operations and Modifications

GraphJoin

GraphJoin[g1,g2]

gives the graph join of the graphs g1 and g2.

Details and Options

  • GraphJoin is also known as complete union.
  • GraphJoin is typically used to produce new graphs with particular reachable subgraphs.
  • GraphJoin[g1,g2] gives a graph obtained from g1 and g2 by joining each vertex of g1 to all vertices of g2.
  • GraphJoin[g1,g2] returns GraphDisjointUnion[g1,g2] together with all edges between each vertex of IndexGraph[g1] and each vertex of IndexGraph[g2,n+1], where n is the VertexCount for g1.
  • GraphJoin takes the same options as Graph.
  • List of all options

    • AlignmentPointCenterthe default point in the graphic to align with
      AnnotationRules{}annotations for graph, edges and vertices
      AspectRatioAutomaticratio of height to width
      AxesFalsewhether to draw axes
      AxesLabelNoneaxes labels
      AxesOriginAutomaticwhere axes should cross
      AxesStyle{}style specifications for the axes
      BackgroundNonebackground color for the plot
      BaselinePositionAutomatichow to align with a surrounding text baseline
      BaseStyle{}base style specifications for the graphic
      ContentSelectableAutomaticwhether to allow contents to be selected
      CoordinatesToolOptionsAutomaticdetailed behavior of the coordinates tool
      DirectedEdgesAutomaticwhether to interpret Rule as DirectedEdge
      EdgeLabelsNonelabels and label placements for edges
      EdgeLabelStyleAutomaticstyle to use for edge labels
      EdgeShapeFunctionAutomaticgenerate graphic shapes for edges
      EdgeStyleAutomaticstyle used for edges
      EdgeWeightAutomaticweights for edges
      Epilog{}primitives rendered after the main plot
      FormatTypeTraditionalFormthe default format type for text
      FrameFalsewhether to put a frame around the plot
      FrameLabelNoneframe labels
      FrameStyle{}style specifications for the frame
      FrameTicksAutomaticframe ticks
      FrameTicksStyle{}style specifications for frame ticks
      GraphHighlight{}graph elements to highlight
      GraphHighlightStyleAutomaticstyle for highlight
      GraphLayoutAutomatichow to lay out vertices and edges
      GridLinesNonegrid lines to draw
      GridLinesStyle{}style specifications for grid lines
      ImageMargins0.the margins to leave around the graphic
      ImagePaddingAllwhat extra padding to allow for labels etc.
      ImageSizeAutomaticthe absolute size at which to render the graphic
      LabelStyle{}style specifications for labels
      MethodAutomaticdetails of graphics methods to use
      PerformanceGoalAutomaticaspects of performance to try to optimize
      PlotLabelNonean overall label for the plot
      PlotRangeAllrange of values to include
      PlotRangeClippingFalsewhether to clip at the plot range
      PlotRangePaddingAutomatichow much to pad the range of values
      PlotRegionAutomaticthe final display region to be filled
      PlotTheme$PlotThemeoverall theme for the graph
      PreserveImageOptionsAutomaticwhether to preserve image options when displaying new versions of the same graphic
      Prolog{}primitives rendered before the main plot
      RotateLabelTruewhether to rotate y labels on the frame
      TicksAutomaticaxes ticks
      TicksStyle{}style specifications for axes ticks
      VertexCoordinatesAutomaticcoordinates for vertices
      VertexLabelsNonelabels and placements for vertices
      VertexLabelStyleAutomaticstyle to use for vertex labels
      VertexShapeAutomaticgraphic shape for vertices
      VertexShapeFunctionAutomaticgenerate graphic shapes for vertices
      VertexSizeMediumsize of vertices
      VertexStyleAutomaticstyles for vertices
      VertexWeightAutomaticweights for vertices

Examples

open all close all

Basic Examples  (3)

Join two graphs:

Wolfram Language code: GraphJoin[[image], [image], ...]

Plot the structure of the adjacency matrices:

Wolfram Language code: GraphJoin @@@ Table[RandomGraph[{5, 7}], 3, 2]
Wolfram Language code: Map[MatrixPlot @* AdjacencyMatrix, %]

Generate wheel graphs:

Wolfram Language code: GraphJoin[Graph[{1}, {}], CycleGraph[14]]

Complete graphs :

Wolfram Language code: GraphJoin[Graph[Range[3], {}], Graph[Range[4], {}]]

Generate dipyramid graphs:

Wolfram Language code: GraphJoin[Graph[{1, 2}, {}], CycleGraph[6]]

Scope  (29)

Directed Graphs  (5)

GraphJoin works with directed graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Simple directed graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Directed multigraphs:

Wolfram Language code: GraphJoin[[image], [image]]

Directed weighted graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Directed annotated graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Undirected Graphs  (5)

GraphJoin works with undirected graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Simple undirected graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Undirected multigraphs:

Wolfram Language code: GraphJoin[[image], [image]]

Undirected weighted graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Undirected annotated graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Mixed Graphs  (5)

GraphJoin works with mixed graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Simple mixed graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Mixed multigraphs:

Wolfram Language code: GraphJoin[[image], [image]]

Mixed weighted graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Mixed annotated graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Multigraphs  (5)

GraphJoin works with multigraphs:

Wolfram Language code: GraphJoin[[image], [image]]

Directed multigraphs:

Wolfram Language code: GraphJoin[[image], [image]]

Mixed multigraphs:

Wolfram Language code: GraphJoin[[image], [image]]

Weighted multigraphs:

Wolfram Language code: GraphJoin[[image], [image]]

Annotated multigraphs:

Wolfram Language code: GraphJoin[[image], [image]]

Weighted Graphs  (5)

GraphJoin works with weighted graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Directed weighted graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Undirected weighted graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Mixed weighted graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Annotated weighted graphs:

Wolfram Language code: GraphJoin[[image], [image]]

Special Graphs  (4)

GraphJoin works on entity graphs:

Wolfram Language code: GraphJoin[["petersen graph"], ["petersen graph"]]

GraphJoin works on trees:

Wolfram Language code: GraphJoin[[image], [image]]

Use rules to specify the graph:

Wolfram Language code: GraphJoin[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 1}, {1 -> 2}]

GraphJoin works with more than two graphs:

Wolfram Language code: GraphJoin[[image], [image], [image]]

Properties & Relations  (4)

Joining the adjacency matrix of two graphs on diagonal and others are ones gets the adjacency matrix of GraphJoin:

Wolfram Language code: {g1 = CycleGraph[3], g2 = CycleGraph[4], g3 = GraphJoin[g1, g2]}
Wolfram Language code: MatrixPlot /@ AdjacencyMatrix /@ {g1, g2, g3}

The join of a single vertex to an empty graph gets a star graph:

Wolfram Language code: {GraphJoin[Graph[{1}, {}], Graph[Range[7], {}]], StarGraph[8]}

The join of a single vertex to a cycle graph gets a wheel graph :

Wolfram Language code: {GraphJoin[Graph[{1}, {}], CycleGraph[7]], WheelGraph[8]}

The join of empty graphs on , , ... nodes gets a complete -partite graph :

Wolfram Language code: GraphJoin[Graph[{1, 2}, {}], Graph[{1, 2}, {}], Graph[{1, 2, 3}, {}], GraphLayout -> "CircularEmbedding"]
Wolfram Language code: CompleteGraph[{2, 2, 3}, GraphLayout -> "CircularEmbedding"]

See Also

GraphDisjointUnion  GraphUnion  GraphIntersection  GraphSum  GraphProduct  GraphComplement  GraphPower  ReverseGraph  LineGraph

Related Guides

    ▪
  • Graph Operations and Modifications

History

Introduced in 2022 (13.1)

Wolfram Research (2022), GraphJoin, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphJoin.html.

Text

Wolfram Research (2022), GraphJoin, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphJoin.html.

CMS

Wolfram Language. 2022. "GraphJoin." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GraphJoin.html.

APA

Wolfram Language. (2022). GraphJoin. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphJoin.html

BibTeX

@misc{reference.wolfram_2026_graphjoin, author="Wolfram Research", title="{GraphJoin}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/GraphJoin.html}", note=[Accessed: 01-September-2026]}

BibLaTeX

@online{reference.wolfram_2026_graphjoin, organization={Wolfram Research}, title={GraphJoin}, year={2022}, url={https://reference.wolfram.com/language/ref/GraphJoin.html}, note=[Accessed: 01-September-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • AI Access
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English